angularjs中的ui-view和ionic中的ion- navview有什么区别?

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

本文关键字:中的 什么 navview 区别 ion- ui-view ionic angularjs      更新时间:2023-09-26

如你所知,在角ui-router中,我们使用ui-view来渲染html到父html。根据这个:

<!-- 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': {},
  }
})

同样在Ionic框架中,我们可以这样使用:

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

有什么区别?

这是自定义的Ionic框架指令。你可以在这里找到详细的描述。它有更多的高级功能,如跟踪历史,过渡和更多。它使用了AngularUI路由器