Styling the components

Before diving into the depths of our Angular app, it might be the case to ask ourselves a quick question about what we just did in the style sheet file of QuizSearchComponent. Is there a reason why we put the search-header and search-navmenu classes there? Couldn't we place them in the AppComponent and NavMenuComponent LESS files to handle everything from the parents, thus leaving the child without a dedicated style sheet?

To properly answer such questions, we need to understand how Angular handles its components and their style sheet files; the best way to do that is to introduce a whole new concept called CSS Encapsulation, which will greatly help us in styling our components.

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

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