Summary

In Angular 2, a component is a class with a decorator that adds important metadata to it. The component decorator defines how we can use it, and what it can do. The selector and the template are the minimum required fields when calling the decorator (Angular will throw an error if one of them is missing).

If we defined the view encapsulation as native, Angular will create a shadow DOM for our component, which protects the embedded styles from being affected by external CSS on the page.

In the next chapter, we will continue to develop our component and make it dynamic.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.5.86