Permanent address same as curre">
我正在尝试使用material angular复选框,并默认将其设置为选中,但显示为未选中,这是什么问题?
<md-checkbox ng-model="loan.currentAsPermanent" aria-label="Checkbox 1" [checked]="isChecked" aria-checked="true"/> Permanent address same as current address </md-checkbox>
发布于 2018-04-23 11:07:13
根据文档使用ng-model
<md-checkbox aria-label="Checkbox 1" ng-model="isChecked" aria-checked="true"/> Permanent address same as current address </md-checkbox>
参考来自official Docs
发布于 2018-04-23 11:08:58
通过ng-model="isChecked"
更改[checked]="isChecked"
或者保留ng-model="loan.currentAsPermanent"
并检查loan.currentAsPermanent
是否为真
发布于 2018-04-23 11:37:13
<md-checkbox ng-model="loan.currentAsPermanent" aria-label="Checkbox 1"> Permanent address same as current address</md-checkbox>
在控制器$scope.loan = {}; $scope.loan.currentAsPermanent = true;
中添加此代码
https://stackoverflow.com/questions/49979576
复制