如何同时加载多个SPA页面(ng-view或ui-view)

时间:2021-10-03 19:38:40

Can any one advise on how to handle the scenario listed below.. I want to load a page block\section by block\section. The spa page has four sections\block, which need to loaded separately. Multiple ajax request will be done which will return back json result and then will be blocks will be rendered.

任何人都可以建议如何处理下面列出的方案..我想通过块\ section加载页面块\ section。 spa页面有四个部分\ block,需要单独加载。将完成多个ajax请求,这将返回json结果,然后将呈现块。

I believe UI Router(ui-view) vs ng-view can be used to handled nested view. But how to handled loading of multiple parts of a page(views ) simultaneously

我相信UI路由器(ui-view)vs ng-view可用于处理嵌套视图。但是如何同时处理页面的多个部分(视图)的加载

1 个解决方案

#1


You can use multiple views when using UI-Router, it's a third party router for angular that replaces the default on. Try going over their documents and user-guide, this section describes a use-case similar to yours

使用UI-Router时可以使用多个视图,它是用于替换默认值的第三方路由器。尝试查看他们的文档和用户指南,本节描述了与您类似的用例

#1


You can use multiple views when using UI-Router, it's a third party router for angular that replaces the default on. Try going over their documents and user-guide, this section describes a use-case similar to yours

使用UI-Router时可以使用多个视图,它是用于替换默认值的第三方路由器。尝试查看他们的文档和用户指南,本节描述了与您类似的用例