4

Up to Ionic3, it was closely packed with Angular.js. So probably the navigation jobs were done by some Angular.js functionality. I can be wrong since I have not worked with Ionic or Angular.js before.

Ionic4 will be framework agnostic, written with Stencil.js and compiled with Stencil.js Compiler to Web Components standard components.

I wonder how navigation tasks will be handled, and by whom? Does Ionic4 have routing capabilities? Or it does not and developer's client-side router of choice must be used, especially I wonder the use case with Stencil.js since it has a router too. For example, how it should be used for a tabbed application Mark up and styles by Ionic, and routing with Stencil.js?

sçuçu
  • 2,960
  • 2
  • 33
  • 60

3 Answers3

1

Ionic will now use angular router. it will make use of angular router-outlets. for the tabbed application markup, each tab will be provided with a named router outlet. Read more here:

Ionic/angular v4 router

ashfaq.p
  • 5,379
  • 21
  • 35
0

Ionic 4 will now use angular routing method instead of default ionic 3 (push/pop) methods. Must read the migration notes from ionic team.

Tanzeel U Rehman
  • 103
  • 2
  • 14
0

Ionic has a component for simple navigation: https://ionicframework.com/docs/api/nav

But it's meant for simple navigation inside modals that doesn't affect the browser's url.

This navigation is controlled by calling methods on the element, so in Angular you have to use @ViewChild and it becomes complex to handle state and have deep navigation trees.

You should use a client-side router for most of your view to take advantage of code splitting and lazy loading your js bundle.

David Villamizar
  • 802
  • 9
  • 16