1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > angular使用动态组件后属性值_angular – 从外部内容加载动态组件

angular使用动态组件后属性值_angular – 从外部内容加载动态组件

时间:2020-01-07 06:29:12

相关推荐

angular使用动态组件后属性值_angular – 从外部内容加载动态组件

我不太确定我是否完全理解你的问题.

Is there a pattern that enables this kind of ‘on-demand-loading’ of components and their templates in ng2?

but they should be able to share services and libraries.

Angulars指南建议共享模块和核心模块.实际上我认为这是最好的方法.只需在上面的链接上向下滚动即可.

Each component is able to communicate its capabilities (in the form of a NG2 component) as well as the protocol implementation and the necessary GUI elements (HTML/CSS) via a package sent over the very same websocket connection.

这是我不确定的部分,就像我不知道我是否理解你的意思.您不想通过websocket连接加载组件吗?如果是这样,为什么呢?如果你的意思是只对每个具有相同websocket的组件进行通信:我建议服务这样做,这将是核心模块的一部分,因此是一个单身人士.然后,组件可以访问此服务,因此它们始终连接到相同的websocket.

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。