Hey there, I'm relatively new to AngularJS and currently on a steep learning curve.
I've been working on developing an AngularJS SPA and have grasped the basics. I'm using ngRoute for routing and have put together a basic application framework.
However, I've run into a roadblock which may be due to my limited knowledge of AngularJS. I'm trying to implement something similar to MVC layouts in my SPA application. What I envision is a setup like this:
Login.html - without a predefined layout, which will be specified on this page Home.html - utilizes layout.tpl.html with the remaining content defined in Home.html
...and so forth. For example, for Home.html I would want to do something like this:
<div layout="layout.tpl.html">
...rest of the content
</div>
The contents of layout.tpl.html could be as follows:
<div class="container">
..layout content including header, left navigation, etc.
<div class="content">
<div layout-content></div>
</div>
</div>
As mentioned earlier, I am using ngRoute in my module to set up the route provider. I'm aiming to achieve something akin to:
@ {
Layout = "_Layout.cshtml"; // or Layout = null;
}
But in AngularJS. Any suggestions on how to accomplish this would be greatly appreciated!