I'm using an index.html
created with Yeoman, that looks something like this:
<html>
<head>...</head>
<body>
<div ng-include="'views/main.html'"></div>
</body>
</html>
Now, I know that I cannot use an ng-include
inside another ng-include
, so I don't even try that, but that's the objective that I want to achieve.
I'm using ui.router
in my main.html for the nested views, but I cannot do something like this:
<header class="header">
<!-- Rather long HTML code that I would like to put in
a separate file like 'views/parts/header.html' -->
</header>
<div ui-view="" class="container"></div>
One naive solution would be to eliminate the first ng-include
and use it in the main.html for header, footer and stuff like that.
So, hit me with what you've got, but not with that!
Edit: this is what I would love to have (but can't, since I'm already inside an ng-include
)
<div ng-include="'views/parts/header.html'"></div>
<div ui-view="" class="container"></div>