angularjs 中的 ui-view 和 ionic 中的 ion-nav-view 有什么区别 [英] What is the difference between ui-view in angularjs and ion-nav-view in ionic

查看:35
本文介绍了angularjs 中的 ui-view 和 ionic 中的 ion-nav-view 有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如你在 angular ui-router 中所知道的,我们使用 ui-viewhtml 呈现给父 html>.根据this:

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 文件:

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

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

Also in Ionic framework we can use this:

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

有什么区别?

推荐答案

这是自定义的 Ionic 框架指令.您可以在此处 ion-nav-view 找到详细说明.它具有更多高级功能,例如跟踪历史记录、转换等等.它确实使用了 AngularUI 路由器.

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.

这篇关于angularjs 中的 ui-view 和 ionic 中的 ion-nav-view 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆