title: Angularjs assigning dynamic ng-model name ,in constructing elements in list?
body: <p>Here i defined my code, please help me in this. I am using angularjs in blade template engine of laravel, in this i couldn't dynamically assign name to ng-model in angular</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$scope.categoryChange=function(id,model){
       $scope.getCategories(id,model);
          };//category change
          orgusers=0;
          $scope.users = new Array();
          $scope.addUsers = function(){
           if($scope.totalExperts&gt;0){
            orgusers++;
               newUser={"name":"name"+orgusers,"model":"expertise"+orgusers,"category":"empcategory"+orgusers};
               $scope.users.push(newUser);
               if($scope.totalExperts!='' &amp;&amp; $scope.totalExperts&gt;0){
                $scope.totalExperts--;
               }
           }else{
            alert("To add users please input total experts field .");
            document.getElementById('focusIt').focus();
           }
          };
          $scope.removeUser = function(removeUser){
           $scope.users.splice($scope.users.indexOf(removeUser),1);
           if($scope.totalExperts!='' || $scope.totalExperts==0){
            $scope.totalExperts++; 
           }
          };
   $scope.getCategories=function(catId,model){
            experts=new Array();
           angular.forEach($scope.categories, function(value,key) {
            if(catId==value.parent){
             experts[key]={id:value.id,name:value.category};
            }
              });
           $scope[model]=experts;
          };</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;ul style="list-style-type: none;"&gt;
      &lt;li ng-repeat="user in users"&gt;
      &lt;label&gt;Name:&lt;/label&gt;&lt;input type="text" name="&lt;%user.name%&gt;" /&gt;
      &lt;label style="display:inline-block;"&gt;Email:&lt;/label&gt;&lt;input type="text" name="empemail[]" /&gt;
      &lt;label style="display:inline-block;"&gt;Phone:&lt;/label&gt;&lt;input type="text" name="empphone[]" /&gt;
      {{ Form::label('select category','',array('style'=&gt;'display:inline-block;')) }}
   &lt;select name="empcategories[]" ng-model="&lt;%user.name%&gt;" ng-options="k as v for (k,v) in mainCategories" ng-change="categoryChange(emp1,'&lt;%user.model%&gt;')" &gt;&lt;/select&gt;
   {{ Form::label('Expertise','',array('style'=&gt;'display:inline-block;')) }}
   &lt;select  name="empspecialized[]" ng-model="empspecialization" ng-options="k as v.name for (k,v) in &lt;% user.model %&gt;"&gt;
   &lt;/select&gt; 
   &lt;button ng-click="removeUser(user)"&gt;-&lt;/button&gt;
      &lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Error: [ngModel:nonassign] Expression '&lt;%user%>' is non-assignable. Element:   any suggestions or solutions , am waiting thanks in advance</p>