-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ng-class screwed up #6419
Comments
Could you provide a plunkr with the generated markup? I think your JADE should look like this:
Note that it's ng-class, and that inside of it is an expression, not an interpolation, so no need for {{}}. But if this is the problem is hard to say without a reproduction. |
This issue doesn't provide enough detail to be actionable. You can find an issue template at http://issuetemplate.com/#/angular/angular.js/issue/6407. Please feel free to create a new issue with more detail, including an example as Narretz mentioned in his comment. |
Hold up, this is relevant to a fix that was put into 1.2.13. Reopening. |
@vavrecka did you happen to update |
Also, please continue reading this here: #6460 |
yea, it got screwed up with angular update to the 1.2.14 I think, after 30 minutes I gave up and installed back 1.2.10 |
You mean |
I got 1.2.13 and this code:
works well |
Try <div ng-init="editAddress = true">
<div ng-class='editAddress ? "glyphicon-floppy-save" : "glyphicon-pencil"' class="glyphicon-floppy-save">
</div> Now set |
no error, works fine |
It may have been a bower issue. Please post a comment if anything else comes up. |
Thanks a bunch! |
I think 1.2.14 screwed it up, but it is no longer on Git as I see, did you deleted the release? |
No, Try using http://code.angularjs.org/snapshot/ or git@github.com:angular/angular.js.git in your bower config to fetch it. If you can, can you paste your bower config here please? |
bower.json:
and bower installed this version of angular: |
So when you say now, do you mean on the latest 1.2.14~ build? |
Keep in mind that the other issue was because of bower: #6460 (comment) |
Oh! Awesome, yep, I have the latest 1.2.14~ build and everything works fine. Thanks for the help. I appreciate it. |
Awesome. Thanks! |
having multiple ng-classes does not work, this chunk of code in JADE:
span.glyphicon(class='{{editLogin ? "glyphicon-floppy-save" : "glyphicon-pencil"}}')
this resolves in throwing this error:
TypeError: Object # has no method 'setClass'
at Object.Attributes.$updateClass (http://127.0.0.1:9000/lib/angular/angular.js:5442:20)
at Object.interpolateFnWatchAction as fn
at Scope.$digest (http://127.0.0.1:9000/lib/angular/angular.js:11867:29)
at Scope.$apply (http://127.0.0.1:9000/lib/angular/angular.js:12116:24)
at HTMLButtonElement. (http://127.0.0.1:9000/lib/angular/angular.js:18026:21)
at HTMLButtonElement.jQuery.event.dispatch (http://127.0.0.1:9000/lib/jquery/jquery.js:4371:9)
at HTMLButtonElement.elemData.handle (http://127.0.0.1:9000/lib/jquery/jquery.js:4057:28) angular.js:9475
(anonymous function) angular.js:9475
(anonymous function) angular.js:6920
Scope.$digest angular.js:11886
Scope.$apply angular.js:12116
(anonymous function) angular.js:18026
jQuery.event.dispatch jquery.js:4371
elemData.handle
The text was updated successfully, but these errors were encountered: