Skip to content
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

templateUrl: relative to app base or relative to their states' urls? #188

Closed
laurelnaiad opened this issue Jun 16, 2013 · 4 comments
Closed

Comments

@laurelnaiad
Copy link

I wonder whether having templateUrls be interpreted relative to the state's url is such a good idea. I was really confused that when I was in a state with a url '/x/y' and I specified a template 'myTempl.html' that the template was being sought at '/x/y/myTempl.html'. I would think that given the way states' urls could be pretty much anywhere, you'd want the templateUrls to be relative to the appbase instead of the state's url... I think this only appears in html5 mode (which makes sense).

I know there's changes in how angular treats app base in the works: angular/angular.js#2969 ...I wonder how they'll impact ui-router in general, if at all.

@ksperling
Copy link
Contributor

Hm, I didn't realize they were... ui-router doesn't do anything to the template URLs one way or another, they just get passed to $templateFactory and from there to $http. Possibly there have been some changes to how $router loads templates as part of the upstream app base changes that should be merged into $templateFactory.

@laurelnaiad
Copy link
Author

Based on that issue I linked, it seems like there's some question as to how url's for templates should be interpreted within the core team.

I don't think the appBase changes in that PR are in anything other than Igor Minar's repository, yet.

Unless there is some reason to try to influence how that proceeds, maybe it's best to wait and see how it shakes out.

@nateabele
Copy link
Contributor

Since I'm guessing this is probably a <base />-related issue, can we close it? /cc @stu-salsbury

@laurelnaiad
Copy link
Author

I think you can certainly control it with base. Thanks for cleaning up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants