0
我有以下途径:角JS UI路由器模板错误
$stateProvider
.state('access', {
abstract: true,
url: '/access',
templateUrl: 'login.html'
})
.state('access.signin', {
url: '/signin',
templateUrl: 'tpls/signin.html',
data: {
authorizedRoles: [USER_ROLES.all]
}
});
$urlRouterProvider.otherwise('/access/signin');
然后我的项目看起来是这样的:
,你可以看到我有一个名为“login.html
模板“这个模板看起来像这样:
<div class="logo">
<a href="index.html">
<img src="./assets/pages/img/logo-big.png" alt=""/> </a>
</div>
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<div class="content" ui-view>
</div>
然而,当我运行这个它加载index.html作为我的模板和犯规利用这一login.html
谁能告诉我是什么香港专业教育学院做错了?为什么这可能会发生?
模板不需要包括JS和CSS文件。也不需要'ng-app'和....这个模板类似于index.html文件。见[此示例](https://stackoverflow.com/questions/39445949/controller-does-not-work-in-route/39446042#39446042)和[此示例](http://plnkr.co/edit/ BjIEXXGt7Akh0LuplPFv?p =预览) –
@Hadi香港专业教育学院udated我的问题 –
@Hadi我所寻找的是彻底改变布局。所以这没有是index.html中的HTML将显示 –