Please can somebody clarify when I would use an ion-nav-view
opposed to an ion-view
? I am learning AngularJS/Ionic (I have a basic understanding of AngularJS; and would like to use Ionic to enhance it).
I understand the ion-nav-view
implements the AngularUI Router service(?) which is a must in order to have nested views within views. But the documentation does not make clear where I should be using one or the other?
All the documentation states for ion-view
is:
A container for content, used to tell a parent ionNavBar about the current view.
But I have seen an ion-view
used outside navbar interface.
So what gives?
Nav is a standalone component for loading arbitrary components and pushing new components on to the stack. Unlike Router Outlet, Nav is not tied to a particular router. This means that if we load a Nav component, and push other components to the stack, they will not affect the app's overall router.
ion-nav-view
is the place where your ion-view
s get injected to.
You can see ion-nav-view
as the frame where your paint, the ion-view
, is gonna be painted on by the $stateProvider
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With