angular - router-outlets and shared components -


i using angular-nativescript , want include components on every site. able achieve using code below in app.component.

<page-router-outlet></page-router-outlet><my-component></my-component>

this doesn't work (as mentioned in documentation). using router-outlet in same way works, can't navigate back. how solve this? played around router-outlet in component , child-routes, getting mixed results.

when put component on every page manually, created new instances , lot of code gets executed wastefully (i pull data server , populate arrays in my-component)

according discussion on nativescript's github behaves should.

page-router-outlet navigates new page (like native app should do) , my-component not present there. router-outlet not navigate anywhere, swaps it's content , button tries navigate previous page. since there none, application closes.

the solution add component manually on each page.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -