Câu hỏi phỏng vấn Angular
Câu hỏi

Do I need to bootst...

Câu trả lời

No, you do not need to bootstrap custom elements. Custom elements, which are a key feature of the Web Components standard, bootstrap automatically when they are added to the DOM and are destroyed when removed from the DOM. Once a custom element is added to the DOM, it behaves like any other HTML element without requiring any special knowledge of Angular or additional bootstrapping[1].

However, when working with Angular Elements, which are Angular components packaged as custom elements, there is a specific build flow for creating them. In this context, the term "bootstrap" is used differently. For Angular Element creation, the bootstrap module is ElementModule instead of AppModule. This is because ElementModule is responsible for registering the component as a custom element in the browser's CustomElementRegistry. The ElementModule needs to implement the DoBootstrap interface, and within it, the ngDoBootstrap() method is used for the ...

senior

senior

Gợi ý câu hỏi phỏng vấn

expert

How Would You Compare View Engine vs Ivy?

senior

What would be a good use for NgZone service?

senior

Why we should use Bazel for Angular builds?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào