【发布时间】:2018-12-20 20:47:39
【问题描述】:
我想在 CMS (Telerik Sitefinity) 中托管一个 SPA。这个应用程序将托管在一个“小部件”中,网址为 http://host/foo/bar/product/{root of SPA}
我将使用 ui-router 来处理 url。如果我像下面这样配置路由状态,url '/' 会解析什么?
MyApp.config(function($stateProvider){
var homeState = {
name: 'home',
url: '/',
templateUrl: '/templates/home.html'
}
$stateProvider.state(homeState);
}
这条路线会到达http://host/ 或http://host/foo/bar/product/ 吗?
同样的问题也适用于 templateUrl: 我需要它映射到http://host/foo/bar/product/
【问题讨论】:
标签: angularjs angular-ui-router