angular ng-model-options getterSetter不工作

时间:2015-04-15 09:09:59

标签: angularjs

我正在尝试使用ng-model-options getterSetter。但是我不能让它来调用我的模型函数。

<input id="idShowDisabled2" type="checkbox" ng-model="myObj.Trev" ng-model-options="{ getterSetter: true }" />Show disabled feeds

如果我只使用常规模型,它会起作用:ng-model =&#34; ShowDisabled&#34;。我也离开了这条线。

<input id="idShowDisabled" type="checkbox" ng-model="ShowDisabled" />Show disabled feeds

在这里小提琴:http://jsfiddle.net/GrimRob/qc5qtg5q/26/

1 个答案:

答案 0 :(得分:0)

该功能使用1.3,但使用ng-change

在1.2中实现并不困难