Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70435

Problem with deeplinks initilization

$
0
0

@franco.echevarria.ex wrote:

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.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>