Does not evaluate ng-class when combined with ui-view
This has been brought up before in #664 and a couple of other duplicates, but does not appear to be fixed: http://plnkr.co/edit/UoSC77d8cizGhBPsfYrr?p=preview
Putting ng-class on a tag with ui-view breaks the ng-class.
From #664, I'd assume that this is merged and working, yet as the plunker shows, it isn't.
'tis valid
Yep, does not also for me.
In the meantime you can use this version: https://github.com/dlukez/ui-router/blob/angular-1.2/release/angular-ui-router.js although it doesn't have any of the updates since 0.2.0 and it only works with 1.2. I intend on trying to write a fix for this in the next week or so since a few people are after this now
Experiencing same issues here. I'm hoping to use ng-class in order to change the animation based on previous and next state.
@dlukez The plunkr i made for https://github.com/angular-ui/ui-router/issues/829 doesn't contain ng-class. So it could be two separat issues. https://github.com/angular-ui/ui-router/issues/829 is a bit confusing, sorry. I want to reopen https://github.com/angular-ui/ui-router/issues/829.
Thanks @dlukez - after an hour of banging my head found this issue and used your version
I've been messing with this tonight and from what I can tell, ng-class/ng-show/ng-hide all do not work on the first state loaded. However, if you navigate, from then on ng-class and others begin to function as expected.
This is also related to #866.
Yep, it's a problem with compiling the ui-view element itself so a lot of other directives aren't working properly. It's strange how it works after a few state changes though...
I encountered the same behaviour in ui-view with Angular v1.2.12 and ui-router v0.2.8. Since in a section of my project I have to switch to a full height (height:100%) html document view the only viable option for me is by now to add & remove class to the ui-view element with jQuery. A fix would be really appreciated.
Or put it on a parent element. I think you can use the animation styles via a parent selector
Sent from my iPhone
On 11/02/2014, at 7:54 PM, lanceschi [email protected] wrote:
I encountered the same behaviour in ui-view with Angular v1.2.12 and ui-router v0.2.8. Since in a section of my project I have to switch to a full height (height:100%) html document view the only viable option for me is by now to add & remove class to the ui-view element with jQuery. A fix would be really appreciated.
— Reply to this email directly or view it on GitHub.
@dlukez : can you give further details? Consider that for a full height html doc the ui-view height attribute should be modified to 100%. Thanks, Luca
@lanceschi Never mind, doesn't look like that works either! Another temporary workaround might be to write a directive that you put on the parent element, that sets a class on the child ui-view element using jqLite/jQuery.
@lanceschi The last solution I mentioned doesn't seem to work either, at least not with a simple implementation. May be best to just wait until a proper fix gets in master
@dlukez: thanks! I agree. For now the jQuery workaround does the trick, nevertheless a fix is needed and would be much appreciated.
Duplicate of #866 Sorry!