0

Sometimes i'm struggling to understand the angular scope, and its inheritance, and today seems to be one of those days...

Basically i just want to disable a button when its pressed, im using ng-click and ng-disable for this. Is there some other method that needs to be used for this kind of function? The ng-docs uses a value that is bound to the ng-disabled, but in my case i would want to simply use one element only.

Heres the Plunkr

4

1 回答 1

2

在你的内部ng-disabled,你已经在用 Angular 编写代码了,所以删除{{}}并直接创建它isdisabled。然后一定要在你的函数中切换它。

Plunkr:http ://plnkr.co/edit/CGzvFjLfkvPV2cuOfb2g?p=preview

于 2013-11-12T19:25:19.667 回答