It’s ionic3
I saw deeplink docs on official docs.
I started ionic web with 3 tabs
on tabs, I want to make router function
for example, if I press about-us tab, it goes to /about-us
anyway, I followed docs
and on app.component.ts
I did like this. and added it on app.module.ts 's providers.
import { SettingPage } from './../pages/settings/setting';
import { RedditPage } from './../pages/reddit/reddit';
import { AboutPage } from './../pages/about/about';
import { Deeplinks } from '@ionic-native/deeplinks';
import { RedditService } from './service/reddit.service';
import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { TabsPage } from '../pages/tabs/tabs';
@Component({
templateUrl: 'app.html',
})
export class MyApp {
rootPage:any = TabsPage;
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen,private deeplinks: Deeplinks) {
platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
// Here you can do any higher level native things you might need.
this.deeplinks.route({
'/about-us':AboutPage,
'/reddit':RedditPage,
'settings':SettingPage
}).subscribe(
(match)=>{
console.log("mated : ",match);
},(nomatch)=>{
console.log(nomatch);
}
)
statusBar.styleDefault();
splashScreen.hide();
});
}
}
and what else I should do?
based on angular2…I should do something on tab like [routerLink]=’/about-us’