Help Angular by taking a 1 minute survey!Go to surveyHome

TypeDecorator

An interface implemented by all Angular type decorators, which allows them to be used as ES7 decorators as well as Angular DSL syntax.

See more...

      
      interface TypeDecorator {
  <T extends Type<any>>(type: T): T
}
    

Description

ES7 syntax:

@ng.Component({...}) class MyClass {...}
      
      @ng.Component({...})
class MyClass {...}
    

Methods

Invoke as ES7 decorator.

(target: Object, propertyKey?: string | symbol, parameterIndex?: number): void
      
      (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void
    
Parameters
target Object
propertyKey string | symbol

Optional. Default is undefined.

parameterIndex number

Optional. Default is undefined.

Returns

void