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 annotation and deco...
1.
What is the difference between annotation and decorator in Angular 2?
Answer»
Annotation
Decorator
Used by Traceur compiler
Used by Typescript compiler
Annotation creates the attribute ‘
ANNOTATIONS
’ that stores arrays and
PASS
metadata to the constructor of the annotated class.
It is a function that
GETS
the object that needs to be decorated (or constructed). They can change the attributes of the object as necessary.
Annotations are hard-coded
Not hard-coded
EXAMPLE
– import {
COMPONENT
} from 'angular2/angular2';
Example - import {ComponentAnnotation as Component} from 'angular2/angular2';
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