How to save the statement for MatTab?

Use tabs with the routing.

<nav mat-tab-nav-bar>
 <a mat-tab-link
 *ngFor="let link of links"
[routerLink]="link.path"
 routerLinkActive #rla="routerLinkActive"
[active]="link.isActive">
{{link.label}}
</a>
</nav>

<router-outlet></router-outlet>


After the user has worked in Taba 1 (filled form) and switched to any other and then returned the statement Taba - namely, the component pogruzhennogo the routing is lost.

How it is solved in angular except the save statement in the service or in storage? He MatTab has a solution?

My problem zakljuchaetsja Tom - what do Label tabs should be in the same componenet. And body tabs in the other. But as you can see from the docks - the material does not allow to separate the tabs and content tabs.
April 19th 20 at 12:23
1 answer
April 19th 20 at 12:25
Solution
except the save statement in the service or in storage

This is the best way.
It is certainly possible to make a projection view from the outside in your tab, but it's an unnecessary complication.

Write the components so that their task was only one - display content. Store.

Find more questions by tags Angular