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

javascript - How abstract states work in Ionic? - Stack Overflow

programmeradmin4浏览0评论

How abstract states work? What is the purpose of the abstract tabs? What is the purpose of the template included in abstract tab? Can I have more than one abstract states? Can I switch from one state to another which are in different abstract states?

I modified the app.js to have 2 abstract states from the default tab template.

But I cant get index.html#/friend/:id working, and FriendDetailCtrl is also not firing.

How abstract states work? What is the purpose of the abstract tabs? What is the purpose of the template included in abstract tab? Can I have more than one abstract states? Can I switch from one state to another which are in different abstract states?

I modified the app.js to have 2 abstract states from the default tab template. https://gist.github./ashoksahoo/6bcad2c62e1abaa3de74

But I cant get index.html#/friend/:id working, and FriendDetailCtrl is also not firing.

Share Improve this question asked Dec 17, 2014 at 11:39 Ashok Kumar SahooAshok Kumar Sahoo 5803 gold badges8 silver badges24 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 3

Abstract states cannot be navigated to. Their purpose is to have several (non-abstract) states share a mon parent, without having to define a parent state that can be navigated to.

This can be useful in many situations. See here: https://github./angular-ui/ui-router/wiki/Nested-States-%26-Nested-Views#abstract-states

You can have many abstract states. You can use $state.go() to switch between any two states, even if they have different parents, abstract or not.

Your URL index.html#/friend/:id looks strange. tab.triends has an argument. friend does not.

The proper URL for the friends state is: /#/tab/friends/1234

For the friend state (no argument!): /#/friend

发布评论

评论列表(0)

  1. 暂无评论