nativescript-angular icon indicating copy to clipboard operation
nativescript-angular copied to clipboard

Page component properties are missing in page-router-outlet

Open mohammadrafigh opened this issue 5 months ago • 3 comments

If I understand correctly, page-router-outlet creates Frame and Pages. Is there any way to set the Page properties in the template? For example, androidStatusBarBackground or statusBarStyle as stated here. I don't know if there are other ways to set these properties when using Angular, So I created this feature request to allow setting these properties through page-router-outlet or maybe using a built-in service.

mohammadrafigh avatar Jul 31 '25 16:07 mohammadrafigh

Forget about it...You'd better go away from NS and try another tech stack...if it's an option...

lostation avatar Aug 01 '25 21:08 lostation

@mohammadrafigh you can inject(Page) in any component and it'll give you the nearest page. Then you can set the styling as you see fit. Same for frame.

edusperoni avatar Aug 01 '25 21:08 edusperoni

@edusperoni Thanks for your suggestion, I've already thought about that but it doesn't make sense if I want to set a property for all Pages rendered using page-router-outlet. Consider I want to set a property globally. It's not a big deal to inject it as a workaround but it would be a bad practice if I want to do it on all page container components.

mohammadrafigh avatar Aug 02 '25 13:08 mohammadrafigh