Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-disabled doesn't work?
Message
 
 
To
All
General information
Forum:
AngularJS
Category:
Troubleshooting
Title:
Ng-disabled doesn't work?
Miscellaneous
Thread ID:
01654749
Message ID:
01654749
Views:
31
Update. May be this is my issue

https://stackoverflow.com/questions/16527935/ng-disabled-doesnt-appear-to-work

I'm trying now to use the original template (without {{}}) but changing my form to be
<data-delete:button title="{{ '@Labels.delete: ' + currentMatrixTemplate.descrip }}"

                                        message="@String.Format(Messages.confirmDelete, Labels.matrixTemplate)"
                                        disable-action="currentMatrixTemplate.usedInItems"
                                        delete="delete()">
                    </data-delete:button>
Update2. That indeed solved the problem. I also have a feeling I came across this one before but forgot.


Hi everybody,

This is what I see when I inspect the button:
<input value="Delete" type="submit" id="btnDelete" class="btn btn-danger pull-right ng-isolate-scope" ng-click="click()" ng-disabled="true" title="Delete: BASEBALL JERSEYS" message="Are you sure you want to permanently delete this Matrix Template?" disable-action="disableAction || currentMatrixTemplate.usedInItems" delete="delete()">
Please note the ng-disabled="true" here.

That button is the directive and its template is
@using Siriusware.Resources;
<input value="@Labels.delete" type="submit" id="btnDelete" class="btn btn-danger pull-right" ng-click="click()" 
ng-disabled="{{disableAction}}" />
I changed ng-disabled to use {{ a moment ago (it used to be just ng-disabled="disableAction" and didn't seem to work.

I am also wondering why we're using input type submit instead of a button ?

Why the ng-disabled doesn't work? My currentMatrixTemplate.usedInItems property is true, so the button is supposed to be disabled, but it doesn't work.

Thanks.
If it's not broken, fix it until it is.


My Blog
Reply
Map
View

Click here to load this message in the networking platform