Angular UI Router: abstract : true won't display page

丶灬走出姿态 提交于 2019-12-10 19:17:56

问题


I'm trying to wrap my brain around Angular UI Router with nested navigation.

My app has multiple pages. I've set up the StateProvider and the basic routing from page to page works. However, I am now trying to implement a tabbed view within one of these pages. I just can't get it to work.

A basic example can be seen here: http://codepen.io/anon/pen/eBLfD

Specifically: 1) the content of the first tab doesn't get loaded and 2) when I set abstract to false the page that holds the tabs does get loaded.

I've tried setting abstract to false, and then the page does load, but the contents of the first tab don't get loaded. I'm bashing my head on this- What am I missing?


回答1:


Whichever tab you want to be the default, inherit from the abstract tab and set the url to

''

http://codepen.io/anon/pen/gApoH



来源:https://stackoverflow.com/questions/21168222/angular-ui-router-abstract-true-wont-display-page

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