Return to site

ANGULAR INTERVIEW QUESTION: Can you define what is a component in Angular?📦

· angular

ANGULAR INTERVIEW QUESTION: Can you define what is a component in Angular?📦

A component is the most basic element🧬 of user interface in an Angular Application.

Furthermore, an Angular application can be viewed like a plain components tree.📦🌳

More precisely, a component is always composed of

―a TypeScript class for the business logic👨‍💼, with an @Component annotation, and of

―an HTML template🎨.

👇👇👇

Component snippet:

A component must always belong to a module to be used in your application or in another module.

👇👇👇

Module snippet:

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK