简体   繁体   English

已经使用过一个ng-view,我现在应该使用ng-include吗?

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

I am creating a SPA using Angular 1. 我正在使用Angular 1创建SPA。

  • User will have a login template to access the portal. 用户将具有登录模板以访问门户。
  • Now on this portal, user will be able to perform CRUD operations. 现在,在此门户上,用户将能够执行CRUD操作。

for switching templates during CRUD operations, I'm already using ng-view in particular div. 为了在CRUD操作期间切换模板,我已经在特定div中使用了ng-view Now I'm confused what should I use to switch template inside <body> with login, register and portal template. 现在,我混淆了如何在<body>使用登录,注册和门户网站模板来切换模板。 One options is ng-include . 一种选择是ng-include

Please share a better approach if you have. 如果有的话,请分享更好的方法。

使用ui-router使用嵌套和多个视图,就像魅力一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM