👉What is component?
👉How we can make a component.
👉How to use component.
What is component?
Component:- Components are the most basic UI building block of Angular APP.
How we can make a component.
Syntax: ng generate component user-list
We can generate component inside the SRC .
user-list.component.ts:- We write a java script and pass a dynamic data or logic.
user-list.component.spec.ts: for testing.
user-list.component.css: for design.
user-list.component.html: is template
How to use component👇
First we can write the code and user-list.component.html and the use this component in app.component
we call user-list.component.html in app.component.
Out put:
0 Comments