最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin4浏览0评论

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?

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?

Share Improve this question asked Sep 6, 2015 at 12:15 Vahid NajafiVahid Najafi 5,30311 gold badges51 silver badges95 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

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.

发布评论

评论列表(0)

  1. 暂无评论