Ionic 2 Web Application Routing

I am new to developing ion 2. I am using ionic 2 to create an application for web and mobile devices. I have one problem in web development using ionic 2.

I use ion navigation 2 to switch from one component to another (push method). This method will not generate a URL for the web application. As soon as we refresh the page, it will go to the route page.

My questions:

  • Is it possible to build url using ionic navigation functions 2?

  • Is it possible to control page refresh in my web application using ion navigation 2?

  • Will angular 2 routing be performed for an ionic application with both a web and a mobile device?

I am really stuck on these issues. please, help!!!!

+4
source share
2 answers

Depends on which version of Ionic you are currently using.

  • For ionic 2.xx, URLs will not be generated by default for push navigation, but you can add a plugin Deeplinksto include URLs for each page.

http://ionicframework.com/docs/native/deeplinks/

  1. If you use the ionic version 3.xx by default using Lazyloading, you will get the URLs for each page. Default URLs are automatically generated, and can also be configured, and you can also put variables getin the URL.

http://ionicframework.com/docs/api/navigation/IonicPage/

: Deeplinks Ionic 3.x.x .

:

  • , .
  • , angular2 , , . , .
  • Deeplinks angular2, "".
+2

Source: https://habr.com/ru/post/1676748/


All Articles