Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AngularJS/Ionic - ion-nav-view vs ion-view

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?

like image 903
keldar Avatar asked Dec 02 '14 17:12

keldar


People also ask

What is ion NAV?

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.


1 Answers

ion-nav-view is the place where your ion-views 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.

like image 157
Clawish Avatar answered Oct 21 '22 12:10

Clawish