如何更改UI的视图模板编程网址 [英] How to change ui-view template URL programatically
本文介绍了如何更改UI的视图模板编程网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想改变用户界面视图
templateUrl
编程从控制器里面,因为 templateUrl
选项不支持服务的注入,我需要一个服务,以确定该模板URL。
I want to change the ui-view
templateUrl
programatically from inside a controller because the templateUrl
option does not support injection of services and I need a service to determine the template URL.
感谢您。
推荐答案
请参阅 templateProvider
的文档在这里:<一href=\"https://github.com/angular-ui/ui-router/wiki/Quick-Reference#template-templateurl-templateprovider\" rel=\"nofollow\">https://github.com/angular-ui/ui-router/wiki/Quick-Reference#template-templateurl-templateprovider
这篇关于如何更改UI的视图模板编程网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文