Making a Website Using Ionic & Firebase Hosting

Thanks for this. I’m looking into webifying my mobile app right now. I’m interested in the segment area. In Ionic’s Conference App they list their segments in app.module.ts (under Links within IonicModule) and they don’t have the segment entry in each Page component like you do. Why is that? Are the two approaches achieving the same thing?

NO , it doesn’t work . when I refresh the page from the browser I got the same error . I do not know how to handle this . I’m thinking of using model to view the detail page and provide it with a refresher in the header of the model to be a replacement , but it is not the best solution for this . Do you have any Idea ?

my code is :
ngAfterViewInit() { this.catId = this.navParams.get('cat').id }

everything is working as expected but when I refresh page using chrome refresher there is error

TypeError: Cannot read property 'id' of undefined
1 Like

Are you using segments? Like in the post above (or - as I mentioned - the way they do it in in the Conference app) ?

1 Like

I didn’t use segment . really I’m a junior . what’s the importance of segment ?

Take a look at app.module in the conference app and you’ll see a list of links with segments (which in some cases have paramaters passed). And also see the docs here:

1 Like

see the bit under Dynamic Links

1 Like

https://blog.ionicframework.com/navigating-lifecycle-events/

This would be of importance aswell.