0
我有ngChange指令,這是沒有被解僱。ngChange沒有被調用
<cs-number-field options="fields.age" ng-model="age" ng-change="update()"></cs-number-field>
使用 '&'
scope: { options: '=', ngModel: '=', ngChange: '&' },
我也有模板填充的方式的NG-改變我的指令範圍內收到的是:
html += '<input type="number" name="myfield" placeholder="{{options.placeholder}}" ng-required="options.required" ' +
' ng-pattern="{{options.pattern}}" ng-minlength="{{options.minlength}}" max="{{options.max}}" step="any" ' +
' ng-maxlength="{{options.maxlength}}" ng-readonly="options.readonly" min="{{options.min}}" ' +
' autofocus="options.autofocus" ng-change="scope.ngChange" data-ng-model="ngModel"/>';
但ngChange是沒有被解僱。 注:我有控制器上定義的更新功能:PLUNKER LINK
請幫忙!!!
感謝狀..這工作 – harishr