Health checks in Angular
It's now time to build an Angular component that is capable of fetching and displaying the structured JSON data we managed to pull off in the previous sections.
As we know from Chapter 2, Looking Around, an Angular component is commonly made of three separate files, as follows:
- The component (
.ts
) file, written in TypeScript and containing thecomponent
class, together with all the module references, functions, variables, and so on - The template (
.html
) file, written in HTML extended with the Angular template syntax, which defines the UI layout architecture - The style (
.css
) file, written in CSS and containing the Cascading Style Sheets rules and definitions for drawing the UI
Although the aforementioned three-files approach is arguably the most practical one, the only required file is the component one, as both the template and the style files could also be embedded as inline elements within the component file...