I guess it’s a zone issue.
Inject NgZone
(import from angular2/core
constructor(private zone:NgZone) {}
this._browser.getStorageValue('api_key', api_key => {
if (api_key) {
this.zone.run(() => this._browser.gotoMain());
}
})
More Related Contents:
- Difference between Constructor and ngOnInit
- How do I share data between components in Angular 2?
- Error when trying to inject a service into an angular component “EXCEPTION: Can’t resolve all parameters for component”, why?
- How to get query parameters from URL in Angular 5?
- In Angular, What is ‘pathmatch: full’ and what effect does it have?
- Ionic 2 Form goes up when keyboard shows
- Angular 2 Component Constructor Vs OnInit [duplicate]
- When to use square brackets [ ] in directives @Inputs and when not?
- Angular2 – Interaction between components using a service
- Reactive forms – disabled attribute
- No provider for AngularFireDatabase, AngularFireAuth
- How to implement sleep function in TypeScript?
- Testing error case with observables in services
- Build Angular2 HTML and TypeScript to a single file
- TS2531: Object is possibly ‘null’
- angular keyvalue pipe sort properties / iterate in order
- Angular subscribe elegant
- How to allow access outside localhost
- Trigger update of component view from service – No Provider for ChangeDetectorRef
- Angular – Make multiple HTTP calls sequentially
- @types/googlemaps/index.d.ts’ is not a module
- Pass parameter into route guard
- Angular 4+ using Google Analytics
- Typescript dependency injection public vs private
- Merging http observables using forkjoin
- @Input() value is always undefined
- Property ‘toPromise’ does not exist on type ‘Observable’
- TypeError: Object prototype may only be an Object or null: undefined Angular 8
- Angular 4 ExpressionChangedAfterItHasBeenCheckedError
- Firestore how to get the collection value from another collection document id is referenced