I\'m having a problem with regards of implementing a resolver on my routes as it has no issue until I include InitialDataResolver
on my routing module.
This lack of detailed error occurred when using Mozilla Firefox
. so what you need to do is to switch over to Google Chrome
to see the specific error.
UPDATED:
You can also Store the error as Global Variable
then you can type temp0.message
to see the actual error message
This error comes due to wrong router declaration. Also exact error never going to come in Firefox. Check route file in chrome. #angularjs-route
In console you can store errors like
ERROR Error: "[object Object]"
as global variable
and then get error message from object temp0.message
Mainly this error is found when using database object from '@angular/fire'
this can be fixed by using this.db.object('/' + ....).subscribe(...)
one-time solution : find function defaultErrorLogger in dist/vendor.bundle.js and add:
for (var _i = 1; _i < arguments.length; _i++) {
values[_i - 1] = arguments[_i];
}
console.log(arguments);
console.error.apply(console, values); code here
then refresh page without recompiling
resolve(route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<any> {
return Observable.create((observer: Observer<any>) => {
this.appInitService.init()
.subscribe(data => {
this.appInitService.preload();
observer.next(data);
observer.complete();
});
}).map(item => !!item)
}
The code above will work for you.
if your rxjs version is 6.x you will use .pipe(map(item => !!item))