Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229612

How to configure deeplinks in AppModule.forRoot()?

$
0
0

Hi, I really dont know how can it work for you, but for me its totally broken, maybe could you help me find a way to use deeplinks in right way please?

I have starter tabs template in ionic 3, this is my deeplink config in app.module.ts:

export const deepLinkConfig: DeepLinkConfig = {
	links: [
		{ component: AboutPage, segment: 'about', name: 'About' },
		{ component: HomePage, segment: 'home', name: 'Home' },
		{ component: ContactPage, segment: 'contact', name: 'Contact' },
		{ component: ContactDetailPage, segment: 'detail', name: 'ContactDetail', defaultHistory: ['Contact'] },
	]
};

and in app.component.ts I want to navigate user to contactDetailPage in Contact tab… I am trying to do it this way:

ngOnInit() {
	window.location.href = "#/contact-tab/detail";
}

this is my tabs.html

<ion-tabs>
    <ion-tab [root]="tab1Root" tabUrlPath="home-tab" tabTitle="Home" tabIcon="home"></ion-tab>
    <ion-tab [root]="tab2Root" tabUrlPath="about-tab" tabTitle="About" tabIcon="information-circle"></ion-tab>
    <ion-tab [root]="tab3Root" tabUrlPath="contact-tab" tabTitle="Contact" tabIcon="contacts"></ion-tab>
</ion-tabs>

When I navigate directly in app by click to tab Contact and then to button for push to ContactDetail it works

and url looks like this: http://localhost:8100/#/contact-tab/detail
but when I open new tab in my browser and paste the URL above, then my tab-bar is missing


and my url changes to http://localhost:8100/#/contact

I am totally frustrated from this, can you help me please?


Viewing all articles
Browse latest Browse all 229612

Trending Articles



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