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
vote
7 answers

Setting validation for button if atleast one check box is selected in ng-repeat

I'm facing a problem in which if I need to enable the save button if at least one check box is selected which is inside ng-repeat. When I click for the first time it works well but dosen't work for multiple check box clicks. Below is the working…
forgottofly
  • 2,729
  • 11
  • 51
  • 93
1
vote
1 answer

What are the reasons for ng-disabled not to work when used in a button

I have a Angular form where i am doing validation. And i want the form to be not submit-able if any required fields are empty and validation fails. The form give bellow.
1
vote
1 answer

how to disable button in kendo grid column

I need to have 2 buttons in a cell. One is calling some function, other is disabling previous button that calls some function. I tried this(part of my template in a column): return '
1
vote
4 answers

Angular - Enable button only if object inside an array contains completed:true

I have an array that contains a bunch of objects. If there are no objects that contains a "true" value for the key "completed", I would like to disable a button. //Here is the format for the array of objects: $scope.todos = [{ …
user2916134
1
vote
0 answers

AngularJS - ng-disabled making input box into drop-down

I am using AngularJS feature "ng-disabled" and here is the HTML code for my input type.
0
votes
0 answers

How to resolve error "can't read properties native element"

I have developed disable and enable functionality in angular. When I click on enable I get the data and it's working fine but when I click on disable I am getting the error "cannot read properties native element". html file -
0
votes
0 answers

Disable Button on Radio Based in Angularjs

i want to disable upload button until not selected of any radio button when i select AAA Radio button then button is enable but when select BBB Then Button is Disable and Select 01 or 02 then Button is Enable Its SolutionsSee Below the picture
0
votes
3 answers

AngularJS - ng-disabled is not disabling my element

I´m trying to hide an option if the condition exists, but the option is still there. Here is my code:
  • Aplicar…
  • Rodri6uez
    • 399
    • 1
    • 5
    • 14
    0
    votes
    2 answers

    How to disable buttons until another button is clicked in angular

    Actually I am stuck in this thing . What I want to do is that I have 3 buttons in my Component.html file in angular and what I need is that when I load the page only the button (Get Bank Details) should be enabled and the other two should be…
    0
    votes
    1 answer

    Programmatically set select option value with angulaJS

    I have this 2 select options in my view and I need to set the second select value to "original" before disable it