InterviewSolution
Saved Bookmarks
| 1. |
What is decorator in angular 2? |
|
Answer» Decorators allow developers to configure classes as elements by putting metadata on them. The most COMMON decorators are @Component one for components and @INJECTABLE one for classes. Decorators are new in TYPESCRIPT, and were not AVAILABLE in AngularJS. Angular2 ONWARDS offers four types of decorators and each plays a unique role - Class, Property, Method, and Parameter. |
|