0
A
回答
0
您可以使用UI-ROUTER
以角度js进行路由。
将UI路由器应用程序建模为状态的分层树。 UI-Router提供一个状态机来以类似事务的方式管理这些应用程序状态之间的转换。
下面是一个例子的路由配置,
$stateProvider
.state('register', {
url: '/register',
templateUrl: 'register.html',
controller: 'registerController'
})
.state('login', {
url: '/logn',
templateUrl: 'login.html',
controller: 'loginController'
})
.state('home', {
url: '/home',
templateUrl: 'partial-home.html'
})
// nested list with custom controller
.state('home.list', {
url: '/list',
templateUrl: 'partial-home-list.html',
controller: function($scope) {
$scope.dogs = ['Bernese', 'Husky', 'Goldendoodle'];
}
})
// nested list with just some random string data
.state('home.paragraph', {
url: '/paragraph',
template: 'I could sure use a drink right now.'
})
相关问题
- 1. 角度路由与快递
- 2. 角度表单和路由
- 3. 角度有效的菜单项,但与路由无关
- 4. 角度路由
- 5. 角度面包屑不工作在页面刷新(ng路由)
- 6. 在自定义页面中使用角度路由器
- 7. 无法使用角度路由重定向页面
- 8. 如何使用角度正确地路由多个html页面
- 9. 使用Hashtag角度在当前页面中路由4
- 10. 如何路由页面使用ui路由器角js
- 11. RESTFUL路由使用相同的页面
- 12. 为同一页面中的多个角度实例定制角度路由
- 13. 页面路由不能在角色JS
- 14. 带路由的角动态页面
- 15. 刷新页面角2路由器
- 16. 基于用户角色角度路由器的动态登录页面“〜3.4.0”
- 17. 角度ui路由器发现刷新页面上的问题
- 18. 覆盖角度ui路由器链接页面锚点
- 19. Angularjs的Spring MVC,正确处理角度路由页面
- 20. 子页面中的角度2路由问题
- 21. 反应原生路由(单页面应用)
- 22. 角度在每个负载页面与路由获取“负载”数据
- 23. 在带有角度路由的页面之间传递表单数据
- 24. 角度2主动路由在单个路由上
- 25. 与区域相关的路由问题
- 26. 路由表单和相关模型
- 27. Django中的角度路由
- 28. 角度路由子模块
- 29. 模板的角度路由
- 30. 角度路由ie9错误