I'm trying to manually bootstrap an Angular application from the callback of an external library ie the inbox sdk.
Current behaviour
At the moment the application bootstraps and renders the initial state of the app but further changes to the app / component state do not cause re renders. ngAfterViewChecked
or ngDoCheck
are never fired again after the initial render.
Bootstrapping outside the of library's callback works fine with change detection. Unfortunately I do need to bootstrap on library calls...
Change detection is all set to default and otherwise it's a standard Angular 7 app built through the CLI.
Here is a working example of the app
The demo breaks if instead of bootstrapping the default way we bootstrap via the library callback as shown below.
src/app/app.module.ts:Appmodule.ngDoBootstrap
...
inboxSDK.subscribe((sdk) => {
this.bootstrapGmail(app, sdk)
})
...
Unfortunately, it's hard to recreate this exact scenario in a jsfiddle as the inbox sdk won't work without the gmail environment and an API key.