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
0
votes
2 answers

AngularJS - Submit button not disabling (im a newbie)

I know I'm doing something wrong, but here is the code:
Raul
  • 115
  • 5
  • 16
0
votes
1 answer

Disable Button if nothing is selected at the dropdown

The button should be disabeled, when nothing is selected at the dropdown. How can I achieve this?
LuMi
  • 41
  • 2
  • 6
0
votes
1 answer

Disable input box until anchor link clicked

I'm trying to set the input text box of my app to disabled until a username is clicked from the right side. I've tried using ng-disabled on the input box, but can't set it to disabled until a link is clicked. I think the username in the users list…
Matt
  • 1,561
  • 5
  • 26
  • 61
0
votes
2 answers

disable the button after one click using ng-disabled

Below is the code for the ng-click, I want the click event only once and then disable the button. But, how to use ng-disabled for only button tag (without using input tag)? Suggestion would be really appreciated for the beginner to angularjs. …
Pooja Thapa
  • 83
  • 1
  • 16
0
votes
2 answers

How to make input text disabled until edit button is clicked in AngularJS?

I have created an edit button and a form. I can't get my input disabled until edit button is clicked. All I want to do is make input disabled and when the user clicks on the edit button they should be able to edit the text. Here is my code:
user7138913
0
votes
1 answer

Not able to disable checkbox if I use ng-model and ng-disable in Chrome V57

I am getting red toaster error in Chrome version 57. If I use both ng-model and ng-disable. I have tab like below: By default classification is…