Skip to content
Permalink
Browse files

nav

  • Loading branch information...
mlynch committed Jun 9, 2016
1 parent 2513d46 commit 8e67175db37c59ae9d5bc16122e1ed5b8edf13d3
Showing with 7 additions and 9 deletions.
  1. +7 −9 app/app.ts
@@ -1,13 +1,11 @@
import {ViewChild} from '@angular/core';

import {App, Platform, Nav, NavController} from 'ionic-angular';
import {StatusBar} from 'ionic-native';
import {StatusBar, Deeplinks} from 'ionic-native';
import {HomePage} from './pages/home/home';
import {AboutPage} from './pages/about/about';
import {ProductPage} from './pages/product/product';

declare var IonicDeeplink:any;

@App({
template: '<ion-nav [root]="rootPage"></ion-nav>',
config: {} // http://ionicframework.com/docs/v2/api/config/Config/
@@ -34,20 +32,20 @@ export class MyApp {
'/products/:productId': ProductPage
}, function(match) {
// Handle the route manually
}, function() {
}, function(nomatch) {
// No match
})
*/

// Convenience to route with a given nav
IonicDeeplink.routeWithNavController(this.navChild, {
Deeplinks.routeWithNavController(this.navChild, {
'/about-us': AboutPage,
'/universal-links-test': AboutPage,
'/products/:productId': ProductPage
}, (routeInfo, args) => {
console.log('Successfully routed', routeInfo, args);
}, (routeInfo) => {
console.error('Unable to route', routeInfo);
}).subscribe((match) => {
console.log('Successfully routed', match);
}, (nomatch) => {
console.warn('Unmatched Route', nomatch);
});
})
}

0 comments on commit 8e67175

Please sign in to comment.
You can’t perform that action at this time.