Hello Im new to ionic. seems like when I define static URL’s instead of using deeplink config. we get hashbangs in URL. This seems very inappropriate for SEO point of view. Hence, I investigated about this but couldn’t find a proper solution for ionic 2. I tried this https://github.com/ionic-team/ionic/issues/11036
But it doesn’t seems to work for ionic 2.
Have a look to
Hey @reedrichards - I tried this approach but the problem is after adding this I am not able to navigate to any other pages
Fyi: My code use lazyloading
@chats1986 try with an incognito browser window, do you face the same error?
might be a cache problem see https://forum.ionicframework.com/t/uncaught-in-promise-error-loading-chunk-20-failed/
I did try that approach… but its the same issue again…when I remove locationStrategy: ‘path’ from app.module.ts the # comes back in the url but works fine
One more issue that I have observed here is when using tabs in ionic 3 constructor is loading twice and the issue is still open on github looks like they are busy fixing ionic 4 but we are left no where with both things not working for us !
@chats1986 honestly I don’t know, I could confirm that the locationStrategy
set to path
just worked fine when I was using Ionic v3 (except for refreshing the page maybe but that isn’t your problem) and of course now that I have migrated to v4, it isn’t needed anymore since the routing is inherited from the Angular one
sorry don’t have any other ideas
Alright will try that… thanks David …
if you have some time I am stuck with another issue your help is needed …On Ionic 4 I am not able to understand on how to get the current selected tab… below is the html code …
//HTML
<ion-tabs #myTabs (ionChange)="tabSwitched(myTabs)"></ion-tabs>
//TS
tabSwitched(myTabs) {
console.log(myTabs.getSelected());
// this.events.publish('refresh:channels', Date.now());
}
//Output comes up like this and I am not sure how to get through the selected Id.
Is this the right approach or am I doing something wrong here…requesting you to please help!
I don’t have that much experience in tabs, you probably better open a separate issue/post
Okie. Thanks for replying!
@reedrichards found the solution…!
All, if anyone is looking for on how to get the current selected tab …find the answer here - [Ionic 4] - Get current Tab selected
Thanks !