简体   繁体   English

Angular2页面渲染

[英]Angular2 page rendering

How is the page in the Angular2 is rendered? Angular2中的页面如何呈现? Does it render all the DOM elements that might be used at the page, for example pop-up, dialog? 它是否呈现页面上可能使用的所有DOM元素,例如弹出窗口,对话框? Or does it render after the element is being invoked? 还是在元素被调用后呈现?

For angular 2 when you spin up a server it loads all the html templates lazily. 对于角度2,当您启动服务器时,它会延迟加载所有html模板。 The index.html page is the entry point and by default the app-root directive is loaded first. index.html页面是入口点,默认情况下会首先加载app-root指令。 If you have say another component featureA and featureB that are triggered by clicking a button or some other UI element those aren't loaded until you actually click on it. 如果您说通过单击按钮或其他一些UI元素触发的另一个组件featureAfeatureB ,直到您真正单击它们,才会加载它们。

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

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