0
여기 내 코드를 정의했습니다. 제발 도와주세요. [ngModel : nonassign] 표현 '<% 나는이에 내가 동적으로 각목록에서 요소를 구성 할 때 동적 모델 이름을 할당하는 각도?
$scope.categoryChange=function(id,model){
\t $scope.getCategories(id,model);
};//category change
orgusers=0;
$scope.users = new Array();
$scope.addUsers = function(){
\t if($scope.totalExperts>0){
\t \t orgusers++;
\t newUser={"name":"name"+orgusers,"model":"expertise"+orgusers,"category":"empcategory"+orgusers};
\t $scope.users.push(newUser);
\t if($scope.totalExperts!='' && $scope.totalExperts>0){
\t \t $scope.totalExperts--;
\t }
\t }else{
\t \t alert("To add users please input total experts field .");
\t \t document.getElementById('focusIt').focus();
\t }
};
$scope.removeUser = function(removeUser){
\t $scope.users.splice($scope.users.indexOf(removeUser),1);
\t if($scope.totalExperts!='' || $scope.totalExperts==0){
\t \t $scope.totalExperts++; \t
\t }
};
$scope.getCategories=function(catId,model){
\t experts=new Array();
\t angular.forEach($scope.categories, function(value,key) {
\t \t if(catId==value.parent){
\t \t \t experts[key]={id:value.id,name:value.category};
\t \t }
\t });
\t $scope[model]=experts;
};
<div>
<ul style="list-style-type: none;">
<li ng-repeat="user in users">
<label>Name:</label><input type="text" name="<%user.name%>" />
<label style="display:inline-block;">Email:</label><input type="text" name="empemail[]" />
<label style="display:inline-block;">Phone:</label><input type="text" name="empphone[]" />
{{ Form::label('select category','',array('style'=>'display:inline-block;')) }}
\t <select name="empcategories[]" ng-model="<%user.name%>" ng-options="k as v for (k,v) in mainCategories" ng-change="categoryChange(emp1,'<%user.model%>')" ></select>
\t {{ Form::label('Expertise','',array('style'=>'display:inline-block;')) }}
\t <select name="empspecialized[]" ng-model="empspecialization" ng-options="k as v.name for (k,v) in <% user.model %>">
\t </select>
\t <button ng-click="removeUser(user)">-</button>
</li>
</ul>
</div>
오류에 겨 모델에 이름을 할당 할 수없는, laravel의 블레이드 템플릿 엔진에서 AngularJS와를 사용하고 user %> '은 (는) 할당 할 수 없습니다. 요소 : 어떤 제안이나 해결책, 미리 감사드립니다.