This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115
stars
21
forks
source link
RadSideDrawer crashes when activating async boot in Angular app #1531
RadSideDrawer crashes on app start when async boot is activated in an Angular app
Which platform(s) does your issue occur on?
Android (NativeScript for Angular)
Please provide the following version numbers that your issue occurs with:
I reproduced the problem with both NativeScript 7 and 8, Angular 10 and 11. Following are the dependencies of the latest @nativescript/template-drawer-navigation-ng template, which I used to reproduce the issue:
Tell us about the problem
RadSideDrawer crashes on app start when async boot is activated in an Angular app
Which platform(s) does your issue occur on?
Android (NativeScript for Angular)
Please provide the following version numbers that your issue occurs with:
I reproduced the problem with both NativeScript 7 and 8, Angular 10 and 11. Following are the dependencies of the latest
@nativescript/template-drawer-navigation-ng
template, which I used to reproduce the issue:Please tell us how to recreate the issue in as much detail as possible.
@nativescript/template-drawer-navigation-ng
async: true
toplatformNativeScriptDynamic()
inmain.ts
JS: ERROR TypeError: Cannot read property 'nativeView' of undefined
I tracked down the exception. It is happening in
ui-sidedrawer.android.js
on line 106page = this.mainContent.nativeView;
It seems to be a timing problem caused by the asynchronous boot. The app was trying to access the main content view before it had been initialized.
I use the async boot option along with the APP_INITIALIZER to load settings before starting the app: https://blog.nativescript.org/angular-launch-animations/index.html