ng-disabled with <li> element not working ?

157 views
Skip to first unread message

Łukasz Roggenbuck

unread,
May 3, 2014, 12:51:12 PM5/3/14
to ang...@googlegroups.com
Hi,
I have a problem with Directive ng-disabled and precisely: 
- If you will use: 
<li class="previous" ng-class="disabled: currentPage == 1"> 
     <a href="javascript:void(0);"> «</ a> 
</ li> 
it does not work 

- If you will use: 
<li ng-disabled="currentPage == 1"> 
     <a href="javascript:void(0);"> «</ a> 
</ li> 
it also does not work 

- But if you will use: 
<li class="next disabled"> 
    <a href="javascript:void(0);"> »</ a>  
</ li> 
it works but want to let it enter only for the first and last pages. 

Please help

Sander Elias

unread,
May 4, 2014, 12:49:19 AM5/4/14
to ang...@googlegroups.com
Hi,

ng-class takes an object like parameter, have a look at this: http://jsfiddle.net/vB2x6/26/

regards
Sander
Reply all
Reply to author
Forward
0 new messages