【发布时间】:2017-04-03 03:12:15
【问题描述】:
我在我的角度/电子应用程序中使用清单模型,并具有以下三个复选框。
两者
美国
加拿大
首先,默认情况下会选中“USA”,但是如果用户点击“Both”或“Canada”,我需要检查特定标志,如果标志为假,我需要提醒用户并避免点击“Both”或“Canada”。 p>
<div style="height:115px;background-color:#FBF9EC" class="form-control" >
<label ng-repeat="item in locations" style="width:80%">
<input type="checkbox" checklist-model="locationData.item" checklist-value="item" checklist-before-change="checkListvalidate(item)" ng-change="checkBoxClickFunc(item)" ng-click="locationClick()">
{{item}}
</label>
</div>
In the controller:
$scope.locationClick = function(){
if(!myFlag){
return false;
}
};
checklist-before-change 的规范说
每次在清单模型更改之前评估的角度表达式。如果它评估为“假”,则模型将不再更改。
我做错了什么......
【问题讨论】:
标签: javascript angularjs electron