-
-
Notifications
You must be signed in to change notification settings - Fork 241
router-outlet usage throws exception if not nested under a page-router-outlet #1384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@bytesoftly indeed there is a breaking change, but you can still have an application without When your application is not using // replace
// platformNativeScriptDynamic().bootstrapModule(AppModule);
// with
platformNativeScriptDynamic({ createFrameOnBootstrap: true })
.bootstrapModule(AppModule); |
@NickIliev Thank you, that makes sense as something now creates the frame. Would it be possible to add this to the documentation: https://docs.nativescript.org/core-concepts/angular-navigation#pages? I feel this is a the first goto page for people learning about routers. It would also be fab if this tutorial could be updated. Let me know if this is the wrong place to make the above two suggestions. |
@bytesoftly thanks - logged as TODO here |
From @bytesoftly on June 14, 2018 10:20
When using a
router-outlet
by itself in an app with Angular for Android causes the following exception:Error: java.lang.IllegalArgumentException: Cannot add a null child to a ViewGroup
On reading router documentation I was not clear on why this happens, there is no mention that
router-outlet
components cannot be used in this way compared topage-router-outlet
components.I believe this tutorial on your site would not currently work with Nativescript 4.0.0 for this reason and that the breaking change happened at some point between that tutorial and now.
Reproduction
To reproduce this error, try the following:
tns create tester --ng
<page-router-outlet></page-router-outlet>
with<router-outlet></router-outlet>
tns debug android
and an uncaught Java exception will be thrownVersion
Nativescript 4.0.0
Copied from original issue: NativeScript/NativeScript#5955
The text was updated successfully, but these errors were encountered: