Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between ui-view in angularjs and ion-nav-view in ionic

As you know in angular ui-router we use ui-view to render an html to parent html. According to this:

<!-- index.html -->
<body>
  <div ui-view="filters"></div>
  <div ui-view="tabledata"></div>
  <div ui-view="graph"></div>
</body>

js file:

$stateProvider
  .state('report', {
  views: {
    'filters': { ... templates and/or controllers ... },
    'tabledata': {},
    'graph': {},
  }
})

Also in Ionic framework we can use this:

<ion-nav-view name="filters"></ion-nav-view>

What is the diference?

like image 819
Vahid Najafi Avatar asked Sep 06 '15 12:09

Vahid Najafi


1 Answers

This is custom Ionic framework directive. You can find detailed description here ion-nav-view. It has more advance features like tracking history, transitions and much more. It does use AngularUI router.

like image 77
Ricardas Avatar answered Oct 14 '22 22:10

Ricardas