0

I have two states that share the same view and have nested urls.

{
  name: 'widget',
  url: '/widget/:widget',
  template: '<widget></widget>'
},
{
  name: 'widget.version',
  url: '/version/:version',
  template: '<widget></widget>'
}

The first one renders fine but the second one doesn't at all, the <widget> component is never mounted. None of the resolves I've added to the widget.version route are never fired either.

Also, the <widget> template never uses ui-view (it doesn't have to).

I also tried this to avoid nested states altogether, but the same thing happens

{
  name: 'widget',
  url: '^/widget/:widget',
  template: '<widget></widget>'
},
{
  name: 'widgetversion',
  url: '^/widget/:widget/version/:version',
  template: '<widget></widget>'
}

How can I get my /version/:version nested url to render?

4
  • So when you go to /version/1 , it does not render <widget> ?
    – Santosh
    Jun 4, 2017 at 1:57
  • @Santosh nope, nothing inside my top level ui-view renders Jun 4, 2017 at 1:59
  • can you post the sample code?
    – Santosh
    Jun 4, 2017 at 2:03
  • im just going with /widget/:widget?version, makes everything a lot easier. Jun 4, 2017 at 2:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.