没有父页面的子页面 template/view
Child page without parent's template/view
我有一些状态是这样的:
stateHelperProvider.setNestedState({
name: "root",
children: [
{
name: "public",
authenticate: false,
children: [
{
name: "login",
url: "/",
title: "Login",
views: {
"main@": {
controller: "LoginController",
templateUrl: "/views/login.html"
}
}
},
]
}
]
});
我需要登录页面使用空白模板(尽可能少),而不是注入 main
。我怎样才能做到这一点?
只需将登录组件移动到单独的路由即可。
我有一些状态是这样的:
stateHelperProvider.setNestedState({
name: "root",
children: [
{
name: "public",
authenticate: false,
children: [
{
name: "login",
url: "/",
title: "Login",
views: {
"main@": {
controller: "LoginController",
templateUrl: "/views/login.html"
}
}
},
]
}
]
});
我需要登录页面使用空白模板(尽可能少),而不是注入 main
。我怎样才能做到这一点?
只需将登录组件移动到单独的路由即可。