I understand the existing system written in Redux + Angular1.5, ES6.

Given:

$stateProvider .state('app.section', { ... template: '<section-header></section-header>' redirectTo: 'app.section.levelOne' ... }) .state('app.section.levelOne', { ... template: '<section-levelOne></section-levelOne>' ... }) .state('app.section.levelOne.first', { ... template: '<section-levelOne-first></section-levelOne-first>' ... }) .state('app.section.levelOne.second', { ... template: '<section-levelOne-second></section-levelOne-second>' ... }); 

Description and Objective:

When we entered the necessary section of the application ( app.section ), we loaded the template ( section-header ), then the first level nesting section of the section ( levelOne ) was loaded - we received the section header with our controller and the main information of the section with our own.

In the first nesting level, we can go one more level down (for example, first) - at this moment it is necessary to change the section-header pattern, in particular, change the information in some places and connect new controls.

How can I do that? I have no other ideas but to transfer everything from section-header to the "lower" templates, no.

Who will help, who will tell?

  • in fact, everything is very simple and depends on what is being rendered. section-header - angular-ui-router supports many views in steits, and you can even specify in which of the steats which template to output - Grundy
  • @Grundy is really simple, it turned out that you need to use the dog symbol for the view attribute, then you can replace the entire template in the child state. It suited me perfectly - Mr. Brightside
  • if you yourself have found a solution, you can post it :) - Grundy

0