为什么我的变量在模板文件中不起作用

时间:2018-12-27 11:09:00

标签: javascript angularjs

我有一个模板

 <tr ng-repeat="emp in legalDocAssetData">
   <td>                              
       <input name="legalAsset_name{{$index}}" ng-model="emp.Name"  ng-disabled="!enabledEdit[editCount++]" />
   </td>
   <td>          
     <select name="legalAsset_selection{{$index}}" ng-model="emp.Selection__c" ng-options="employe.name as employe.name for employe in borrowerDesignationList" ng-disabled="!enabledEdit[editCount++]"></select>
   </td>
   <td>
       <input name="legalAsset_email{{$index}}" ng-model="emp.Email_Address__c"  ng-disabled="!enabledEdit[editCount++]"/>
   </td>                            
   <td >
     <div class="buttons" align="center">
       <button class="btn" ng-disabled="isReadOnly" ng-click="editEmployee(editCount)"><i class="fa fa-edit"></i></button>
     </div>  
   </td>
 </tr>

<tr ng-repeat="emp in achData">
   <td>                              
       <input name="ach_name{{$index}}" ng-model="emp.Name"  ng-disabled="!enabledEdit[editCount++]" />
   </td>
   <td>          
     <select name="ach_selection{{$index}}" ng-model="emp.Selection__c" ng-options="employe.name as employe.name for employe in achList" ng-disabled="!enabledEdit[editCount++]"></select>
   </td>
   <td>
       <input name="ach_email{{$index}}" ng-model="emp.Email_Address__c"  ng-disabled="!enabledEdit[editCount++]"/>
   </td>                            
   <td >
     <div class="buttons" align="center">
       <button class="btn" ng-disabled="isReadOnly" ng-click="editEmployee(editCount)"><i class="fa fa-edit"></i></button>
     </div>  
   </td>
 </tr>

而且,在控制器中,我有一个变量

$scope.editCount=0

我的模板未加载并显示错误

  

angular.min.js:103错误:[$ parse:语法]

这是什么问题?

0 个答案:

没有答案