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

孤者浪人 提交于 2019-12-08 17:34:06

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/32423447/what-is-the-difference-between-ui-view-in-angularjs-and-ion-nav-view-in-ionic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!