This is a migrated thread and some comments may be shown as answers.

use angular ngDisable with kendo mobile

4 Answers 64 Views
HTML5, CSS, JavaScript
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Naomi
Top achievements
Rank 1
Naomi asked on 17 May 2015, 07:59 AM

I'm try use ng-disable in angular + kendo mobile but it is not work for me.

I try this code: 

<kendo-mobile-button id="buy-now" ng-disabled="isPlaceOrderEnable()" ng-click="menu.addToCart(kendoEvent)">Place Order</kendo-mobile-button>

the 'isPlaceOrderEnable' function defined in the controller and return true/false.

but the button is always enebled.

Thanks in advance.

Naomi.

4 Answers, 1 is accepted

Sort by
0
Martin Yankov
Telerik team
answered on 20 May 2015, 10:42 AM
Hello Naomi,

I have tested this in the Kendo UI Dojo and here is the result - http://dojo.telerik.com/imANA. I have tested both the ng-disabled and the k-enable directives and they both work as expected. Perhaps there is something else in your project that is failing.

Let me know your thoughts.

Regards,
Martin Yankov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Jeremy
Top achievements
Rank 1
answered on 01 Sep 2015, 07:41 PM

I cannot get this work either. 

Tried, ng-enabled/ng-disabled, k-ng-enabled/disabled, disabled, ect .....and the only one that worked was disabled, but only at load. 

 

0
Jeremy
Top achievements
Rank 1
answered on 01 Sep 2015, 07:42 PM
Current mark up is like

<kendo-mobile-button k-align="'right'" ​ng-disabled="viewModel.type != 2" ng-click="viewModel.save()">Save</kendo-mobile-button>
0
Anton Dobrev
Telerik team
answered on 04 Sep 2015, 03:32 PM
@Jeremy

Could you please consult the official documentation from here for the proper attribute usage. I am suspecting that the viewModel changes are not applied in the digest scope and thus the button is not updated.

Let me know if this solves the issue.

Regards,
Anton Dobrev
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
HTML5, CSS, JavaScript
Asked by
Naomi
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Jeremy
Top achievements
Rank 1
Anton Dobrev
Telerik team
Share this question
or