Thanks, but I still don’t understand how should I implement the same in vanilla js as I cannot import or export the components there. What I don’t understand is the component part in pure js.
Hope you got my point.
Also can I use pure js function to redirect user ?
Okay I get creating custom elements. However I still don’t understand the use of url attribute in ion-route element. I want to redirect to /new-page.html page where new-page is the name of my custom element
Routes will be handled client side, so you won’t load new-page.html. Instead, that route will be handled by the router, then your ion-route will be called, which will then load the matching component based on the url argument. You could have those components in different files/etc. but that would mean using a bundler like webpack/etc. or using es imports.
Start with just getting the routes working correctly before you explore separating the components out into different files.
@max Well I have made some progress with navigation but I am not sure if that is correct or not because though I am able to navigate but the browser console gives an error saying [ion-router] the path does not match any route
As suggested I have used the same naming convention as in the example above. The only way my navigation is working because of the href attribute in ion-tab-button tag.