我使用 AngularJS 构建了我的应用程序。 ng-view
通过 routeProvider 设置路由。
一切正常,但我想知道如何获取当前的 templateUrl?
$routeProvider.
when('/terms', {
templateUrl: '/pages/terms.html',
controller: AboutController
});
在这种情况下 /pages/terms.html
...
最佳答案
您可能正在寻找 $route.current.templateUrl
。
关于javascript - AngularJS获取当前templateUrl(html页面),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13326994/