Hi,
It would be great if there is a way to change the way nativescript-angular's bootstrap creates the Page instances used though the application life circle. I looked though the code and noticed there is a provider (defaultPageProvider) for the Page elements (not exactly sure how it is utilized as removing it in my fork did not break any navigation) and couple of places where the new Page is being created (for example here and here)
Having the possibility of placing our own class which inherits the Page class in an Angular 2 {N} application will be very useful and as it is already possible in vanilla {N} I think it will make migrating to Angular even easier and better.
Some thoughts on that:
The Page provider gives you access to the current page instance that is hosting the component and there is no way to replace it.
Maybe the way to go is to use PageFactoryProvider, that you can replace with custom factory for pages in your app.
Another way of achieving this behavior would be (not sure if possible probably not :)) to use the same approach like the ActionBar in Angular 2, by simply declaring a <Page> in the Component itself. This way we may have different HTML declared Page instances rather than having nativescript-angular create them for us.
Hi guys, any progress on this?, has someone found a workaround for android?.
Most helpful comment
Hi guys, any progress on this?, has someone found a workaround for android?.