Questions tagged [angularjs-ng-disabled]

This directive sets the disabled attribute on the element if the expression inside ngDisabled evaluates to truthy. The attribute is `disabled` with a `d`.

Spelling Note: The attribute is disabled; the directive is ng-disabled;
Both include the letter d at the end.

A special directive is necessary because we cannot use interpolation inside the disabled attribute.

Erroneous

<div ng-init="isDisabled = false">
    <button disabled="{{isDisabled}}">Disabled</button>
</div>

Use instead:

<div ng-init="isDisabled = false">
    <button ng-disabled="isDisabled">Disabled</button>
</div>

Resources

93 questions
-1
votes
1 answer

How I can use ng-disable in a iframe

I have in iframe which I set ng-disable to true, in the iframe I call an html that contains a textarea, but even though the iframe is disabled this control I can access it without any problem. How or what should be done to disable and enable in run…
-1
votes
1 answer

how to write function to target specific variable for ng disable that inside ng repeat?

I'm trying to build todo list app in angular. When you add new item, it will add to input box(by default, i set it to disabled) inside the table and also add Edit link next to that input. Once i click on the Edit, the input box will enable. ( i got…
-2
votes
2 answers

Using ng-disabled button is still disabled even if value in condition changes

I have a button: When the application loads someProperty does not exist on ctrl.myService.getData(). So the button is disabled. But after a few…
bobbyrne01
  • 6,295
  • 19
  • 80
  • 150
1 2 3 4 5 6
7