Search code examples
javascriptangularjsng-viewangularjs-ng-include

Already used one ng-view, should I use ng-include now?


I am creating a SPA using Angular 1.

  • User will have a login template to access the portal.
  • Now on this portal, user will be able to perform CRUD operations.

for switching templates during CRUD operations, I'm already using ng-view in particular div. Now I'm confused what should I use to switch template inside <body> with login, register and portal template. One options is ng-include.

Please share a better approach if you have.


Solution

  • Used nested and multiple views using ui-router, worked like charm.