What is the difference between directive and component?
S.no | Directive | Component |
---|---|---|
1. | It is a behavior that has been added to the existing components. | Components have their own view i.e., HTML and styles. |
2. | There can be multiple directives in one element. | There can be only one component in one element. |
Note: These are Full Stack developer interview questions. Candidates who are deciding to switch to Full Stack or looking for a job must read this.
BY Best Interview Question ON 30 Jan 2020