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

Referencing nested named views only possible with full qualified name #3355

Closed
1 of 3 tasks
yanxch opened this issue Feb 27, 2017 · 3 comments
Closed
1 of 3 tasks

Referencing nested named views only possible with full qualified name #3355

yanxch opened this issue Feb 27, 2017 · 3 comments

Comments

@yanxch
Copy link

yanxch commented Feb 27, 2017

This issue tracker is for Bug Reports and Feature Requests only.
Please direct requests for help to StackOverflow. See http://bit.ly/UIR-SOF for details.

This is a:

  • Bug Report
  • Feature Request
  • General Query

My version of UI-Router is: (1.0.0-rc.1)

Bug Report

Current Behavior:

Named nested ui-views have to be referenced with their full qualified name.

<ui-view name="outer"> <ui-view name="inner"> </ui-view> </ui-view>

Inner ui-view has to be referenced with
$stateProvider .state('home', { url: '/home', views: { 'outer.inner': { template: '<home></home>' } } });

Expected Behavior:

Reference a nested named ui-view just with its name.

Plunker:
https://plnkr.co/edit/MSEbqC4NMoilPUSg1o3H

@mischkl
Copy link

mischkl commented Feb 28, 2017

Same problem here - took me ages to figure out the source of the problem when migrating from 0.3.x. Additionally even when using fully qualified views, although everything seems to work, I get multiple of the following error messages on page load:

TypeError: Cannot read property 'creationContext' of undefined
    at http://localhost:9000/app-c2348b49c392b6c1ffe9.js:115048:64
    at Array.filter (native)
    at matchingConfigPair (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:115065:54)
    at Array.map (native)
    at ViewService.sync (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:115081:58)
    at ViewService.registerUIView (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:115106:14)
    at Object.<anonymous> (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:157668:40)
    at http://localhost:9000/app-c2348b49c392b6c1ffe9.js:178322:18
    at invokeLinkFn (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:187215:9)
    at nodeLinkFn (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:186614:11)
    at compositeLinkFn (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:185873:13)
    at compositeLinkFn (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:185876:13)
    at publicLinkFn (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:185753:30)
    at Object.<anonymous> (http://localhost:9000/app-c2348b49c392b6c1ffe9.js:157811:17)
    at http://localhost:9000/app-c2348b49c392b6c1ffe9.js:178322:18

@christopherthielen
Copy link
Contributor

Thanks for the great bug report.

This was not intentional, and will be fixed in rc.2

https://plnkr.co/edit/JYnnsrBYHaWzyYK6QhT0?p=preview

@mischkl
Copy link

mischkl commented Aug 1, 2017

We've upgraded to the newest version 1.x and are still getting the issue with the creationContext error :(

Looks like it's a problem with the angular-hybrid package.. will report there.

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