So, it seems I am not getting ui-router
, after all.
Here is the broken example: http://plnkr.co/edit/WgDqTzE3TJjrCZ2pxg5T?p=preview
The actual file structure is:
app/
app.js
index.html
main/
main.html
header/
header.html
footer/
footer.html
sections/
content1/
content1.html
content2/
...
index.html
has a simple <div ui-view></div>
main.html
has:
<div ui-view="header"></div>
<div ui-view></div>
<div ui-view="footer"></div>
header.html
, footer.html
, content1.html
, ... have actual content.
app.js
has:
$stateProvider
.state("app", {
url: "",
abstarct: true,
templateUrl: "main.html"
})
.state("app.main", {
url: "",
abstarct: true,
views: {
"header": {
templateUrl: "header.html"
},
"footer":{
templateUrl: "footer.html"
}
}
})
.state("app.main.content1", {
url: "/",
templateUrl: "content1.html"
});
So, I thought this meant going to "/" would show me header, footer, and automatically insert content in the unnamed ui-view
.
It does not. What am I doing wrong?