Witajcie,
Mam kod taki jak poniżej:
index.html:
<!-- Ładowanie angulara i appki w head -->
<body>
<div ui-view="header"></div>
<div ui-view="content"></div>
<div ui-view="header"></div>
</body>
konfiguracja appki:
.config(function($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise("/home");
$stateProvider
.state("root", {
abstract: true,
views: {
header: {
templateUrl: "template/header.html"
},
content: {
templateUrl: "template/content.html"
},
footer: {
templateUrl: "template/footer.html"
}
}
})
.state("root.home", {
url: "/home",
views: {
"content@root": {
templateUrl: "template/home/content.html"
}
}
});
Problem polega na tym, że przy przejściu do /home ui-view="content" nie zostaje nadpisany templatem z "template/home/content.html" tylko pozostaje template z "template/content.html".
Dlaczego tak sie dzieje i jak temu zaradzić?