Home
About Us
Contact Us
Bookmark
Saved Bookmarks
Current Affairs
General Knowledge
Chemical Engineering
UPSEE
BSNL
ISRO
BITSAT
Amazon
ORACLE
Verbal Ability
→
Frontend
→
Advanced JavaScript Interview Questions in Frontend
→
What is the difference between directive and compo...
1.
What is the difference between directive and component in Angular 2?
Answer»
Components
Directive
1.
To
REGISTER
,
USE
@Component meta-data annotation
To register, use @Directive meta-data annotation
2.
Used to create UI widgets and break up app into smaller components
Use to design re-usable components and add behavior to
EXISTING
DOM element.
3.
Only one component allowed per DOM element
Many
DIRECTIVES
allowed per DOM element.
4.
@
VIEW
decorator is mandatory
Does not use View.
Also Read: Angular 6 Question and Answers
Show Answer
Discussion
No Comment Found
Post Comment
Related InterviewSolutions
Could you explain the various types of filters in Angular 10?
What is the difference between annotation and decorator?
How do observables differ from promises in angular?
What is the AOT Compilation?
How does Angular 10 integrate with bootstrap?
What are the lifecycle hooks in angular 10?
What are the benefits of using HTTPClient in Angular 10?
What do you mean by the Wildcard Route?
Which one is the best out of AOT and JIT?
What are the new features of Angular 10?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply
Your experience on this site will be improved by allowing cookies. Read
Cookie Policy
Reject
Allow cookies