Angular UI Router:摘要:true不会显示页面 [英] Angular UI Router: abstract : true won't display page
问题描述
我正在尝试通过嵌套导航将大脑包裹在Angular UI Router上.
I'm trying to wrap my brain around Angular UI Router with nested navigation.
我的应用有多个页面.我已经设置了StateProvider,并且从页面到页面的基本路由工作.但是,我现在试图在这些页面之一中实现选项卡式视图.我就是无法正常工作.
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.
一个基本的例子可以在这里看到: http://codepen.io/anon/pen/eBLfD
A basic example can be seen here: http://codepen.io/anon/pen/eBLfD
具体来说:1)第一个标签页的内容未加载; 2)当我将abstract设置为false时,包含这些标签页的页面确实已加载.
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.
我尝试将abstract设置为false,然后页面被加载,但是第一个选项卡的内容没有被加载.我为此this之以鼻-我想念什么?
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?
推荐答案
要将哪个标签设为默认标签,请从abstract标签继承,并将url设置为
Whichever tab you want to be the default, inherit from the abstract tab and set the url to
''
http://codepen.io/anon/pen/gApoH
这篇关于Angular UI Router:摘要:true不会显示页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!