Decorators and Modules (import/export)
Learn Decorators and Modules (import/export) (Phase 2 · TypeScript Fundamentals (Essential), Angular) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.
Decorators: Java annotations for TypeScript • A decorator is a function applied with @name to a class, property, method or parameter, adding metadata or behaviour. Angular's decorators are the equivalent of Java annotations: @Component , @Injectable , @Directive , @Pipe , @NgModule , and older @Input , @Output , @ViewChild , @HostListener . • Angular reads this metadata at build time (AOT) to wire templates, dependency injection and change detection.