离子原生deeplink没有路由到特定页面

时间:2017-08-09 04:05:33

标签: ionic3

我使用离子原生Deeplinks插件和下面的代码:

import {Component, ViewChild} from '@angular/core';
import {Platform, Nav, ionicBootstrap} from 'ionic-angular';
import {Deeplinks} from 'ionic-native';

import {AboutPage} from './pages/about/about';
import {HatDetailPage} from './pages/hat/hat';

@Component({
  template: '<ion-nav [root]="rootPage"></ion-nav>',
})
class MyApp {
  @ViewChild(Nav) nav:Nav;

  constructor(private _platform: Platform) {}

  ngAfterViewInit() {
    this._platform.ready().then(() => {
      Deeplinks.routeWithNavController(this.nav, {
       '/about-us': AboutPage,
       '/hats/:hatId': HatDetailPage
      });
    });
  }
});

我测试了它,我可以打开应用程序,但不能将我引导到页面,有人有想法吗?

0 个答案:

没有答案