Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$location or component templateUrl bug #14201

Closed
tamtakoe opened this issue Mar 9, 2016 · 2 comments
Closed

$location or component templateUrl bug #14201

tamtakoe opened this issue Mar 9, 2016 · 2 comments

Comments

@tamtakoe
Copy link

tamtakoe commented Mar 9, 2016

If I set $location as application.run dependency or if I set templateUrl (async template) router doesn't work.
http://plnkr.co/edit/kXcik8znN5HMp6ohRuMA?p=preview

If you remove problem dependency or change templateUrl to template everythink works correct.

@Narretz
Copy link
Contributor

Narretz commented Mar 9, 2016

I've answered on the linked issue and I think it's a ui-router bug. At least the debugging should be done by someone who knows the ui-router.

@gkalpak
Copy link
Member

gkalpak commented Mar 10, 2016

Closing as this is indeed a uiRouter issue and has been fixed in v1.0.0alpha0 of uiRouter (see angular-ui/ui-router#2574).
The easy work-around for those who can't upgrade, is to instantiate $state early (e.g. inside a .run() block).

@gkalpak gkalpak closed this as completed Mar 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants