Angular Nested -ui-router states do not work with multiple views

Trying to create nested views works, but cannot figure out where I'm doing it wrong. I have a parent view with navigation and content, and when the user clicks the navigation links, he must load the correct view. For some reason, it still shows default content.

There are separate login and error states with views, but I deleted them to simplify the example.

Here is the plunker: http://plnkr.co/edit/bvcNzDwSanPkVm1zASVe?p=preview

Therefore, when the user clicks on the link, he should see a template of the selected state loaded in an unnamed ui-view.

+4
source share
1 answer

Finally, he decided. I have to add an extra ui-view to the default mode:

'': {
      template: '<div ui-view></div>'
    },

The plucker works here: http://plnkr.co/edit/zy4mYR?p=preview

+2
source

Source: https://habr.com/ru/post/1526346/


All Articles