Hi guys, I need help with the following:
I’m receiving this error: “ReferenceError: Cannot access ‘DeeplinkingProvider’ before initialization”
I have already deeplinks implemented and working, but I’m adding a new route and the destination component is importing algo the DeeplinkingProvider and that is causing the error.
The question is why ? because the other route are using components wich are importing also the DeeplinkingProvider. So i’m doing the same but for this component is not working. Any idea ?
this.deeplinks.route({
'/invite/:code': EnterInviteCodePage,
'/invite': EnterInviteCodePage,
'/sms-verification': EnterSmsCodePage, // <---- with this new component is failing (and is equal to the other component)
'/home': HomePage
}).subscribe((match: DeeplinkMatch) => {
setTimeout(() => {
if (match.$link) {
switch (match.$link.host) {
case '/invite':
this._code = match.$link.queryString;
// broadcast code to invite code page
this._codeObservable.next(this._code);
break;
case '/home':
// broadcast home observable to open home tab when clicking on link
this._homeObservable.next();
break;
}
}
}, 100);
}, (nomatch) => {
console.error('nomatch:', nomatch);
});
This is called and intilized after the platform.ready() from another … and working for the current, the problem is with new component. The new component I have tested with an empty component only importing the DeeplinkingProvider or with a copy of the current (and working), both are failing. Thanks in advance.