1
In the current scenario, I have an index.html that works as a kind of template. For example, in it I have a side menu, a toolbar at the top and, at the "center", a div (ng-view) to receive dynamic content.
The point is that the login screen has nothing to do with this "template". It has its own characteristics. In this case, what would be the best approach? I thought of some solutions, but I would like the opinion of someone more experienced with SPA’s.
I would particularly leave the
index
only with aui-view
central and controlled bystates
. So, after authenticating the user, you would have what is currently yoursindex
and which contains the "frame" so to speak of its pages– Sorack
Okay, that was my initial idea, really. What would the implementation look like? I mean, each of my dynamic pages (contact registration, for example) should contain its contents + what is now part of the template (sidebar, Toolbar, etc.) ?
– fnx
Not exactly. You can have a
ui-view
within the other. You are working withui-router
?– Sorack
I’m wearing 'ngRoute''.
– fnx
Take a look this link with the differences between ui-router and ngRoute, the strongest difference for me is in the multiple
views
. Without them you won’t be able to do what I was describing here satisfactorily– Sorack
Perfect! Exactly what I needed.
– fnx
I’ll see if I can put an example in the answer, so you can see more or less how it looks
– Sorack