类装饰
装饰NgModule
@NgModule({ providers?: Provider[] declarations?: Array | any[]> imports?: Array | ModuleWithProviders | any[]> exports?: Array | any[]> entryComponents?: Array | any[]> bootstrap?: Array | any[]> schemas?: Array id?: string})复制代码
装饰Component
@Component({ changeDetection?: ChangeDetectionStrategy viewProviders?: Provider[] moduleId?: string templateUrl?: string template?: string styleUrls?: string[] styles?: string[] animations?: any[] encapsulation?: ViewEncapsulation interpolation?: [string, string] entryComponents?: Array | any[]> preserveWhitespaces?: boolean selector?: string inputs?: string[] outputs?: string[] host?: {...} providers?: Provider[] exportAs?: string queries?: {...}})复制代码
装饰Directive
@Directive({ selector?: string inputs?: string[] outputs?: string[] host?: {...} providers?: Provider[] exportAs?: string queries?: {...}})复制代码
装饰Pipe
@Pipe({ name: string pure?: boolean})复制代码
装饰 Injectable
@Injectable({ providedIn?: Type | 'root' | null factory: () => any})复制代码
属性装饰
@Attribute({ attributeName?: string})复制代码
@HostBinding({ hostPropertyName?: string})复制代码
@HostListener({ eventName?: string args?: string[]})复制代码
@Input({ bindingPropertyName?: string})复制代码
@Output({ bindingPropertyName?: string})复制代码
@ContentChild()复制代码
@ContentChildren()复制代码
@ViewChild()复制代码
@ViewChildren()复制代码
参数装饰
@Host()复制代码
@Optional()复制代码
@Self()复制代码
@SkipSelf()复制代码
@Inject({ token: any})复制代码