支持路由AngularJS UI引导标签 [英] AngularJS UI Bootstrap Tabs that support routing

查看:218
本文介绍了支持路由AngularJS UI引导标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用 AngularJS UI引导标签在我的项目,但我需要它来支持路由。

I would like to use AngularJS UI Bootstrap Tabs in my project, but I need it to support routing.

例如:

Tab         URL
--------------------
Jobs       /jobs
Invoices   /invoices
Payments   /payments

据我可以从源$ C ​​$ C来讲,当前标签面板指令没有按'T支持路由。

As far as I can tell from the source code, the current tabs and pane directives doesn't support routing.

什么是添加路由的最佳方式?

What would be the best way to add routing?

推荐答案

要添加路由您通常使用的NG-观点指令。我不知道它很容易修改UI的角度来支持你在找什么,但在这里是一个plunker 显示大致是什么,我认为你正在寻找(它不一定做的最好的方式 - 希望有人可以给你一个更好的解决方案或改进这一点)

To add routing you typically use an ng-view directive. I'm not sure it's easy enough to modify angular UI to support what you're looking for, but here's a plunker showing roughly what i think you're looking for (it's not necessarily the best way of doing it - hopefully someone can give you a better solution or improve on this)

这篇关于支持路由AngularJS UI引导标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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