-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix for #774: made uiView link function manipulate the el passed into it... #921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Pretty sure this is going to fix about 20 different issues we have going on right now (ui-view in ng-if, ui-view with ng-class, ui-view in custom transclue, etc) do you think I'm right? |
Would you be up for writing some tests that test each of those scenarios?
These are all the actual symptoms that were happening because of this issue. |
Also the commit message would have to be: "fix(uiView): ui-view inside a directive that does ng-tranclude does not work, and other related issues when ui-view with ngIf, ngClass, ngRepeat, and ngTransclude" |
I have never written any karma tests, but will give it a shot. |
Chris, you rock so much you have no idea. Thank you sincerely for pitching in. I hope it is rewarding for you! |
I just realized #858 may be trying to fix the same thing. Can you please review that PR and see if there's anything you need from it? |
Doh, that PR looks like the exact same solution as mine |
@timkindberg - Just letting you know that I have specifically tested each one of those above and my pull request #858 has fixed each of them :). I'll see about writing some more tests with those in mind, but I can't today. Hopefully this weekend! |
@timkindberg - Sorry, I forgot that I haven't pushed my latest changes that does enable ngRepeat. The uiView directive will need it's own isolate scope for it to work so you can do things like <ui-view ng-repeat="view in views" name="{{view.name}}"></ui-view> Instead of using an isolate scope, I could possibly just |
@meenie you rock. Would it be different if the ui-view was within an ng-repeat, instead of on same element? |
@timkindberg - No actually, it wouldn't matter where it was at inside an ngRepeat. I toyed around with using an isolate scope in uiView but that started to create a lot of issues. What I'm going to do is the |
Don't waste too much energy on that. I'd say using it with ngRepeat could be a different commit/feature if needed. We could consider it out of scope for this one if its too much of a pain. |
I'll give it a quick try and see how it goes :). |
Fix for #774
The element from compile step was being used during link function. However, the element had been removed from dom and replaced by a parent directive, so all link operations were occuring against a detached dom node. All tests pass.