Skip to content

Instantly share code, notes, and snippets.

@iamssen
Last active January 22, 2016 09:58
Show Gist options
  • Save iamssen/51db74cb47b3e6a04924 to your computer and use it in GitHub Desktop.
Save iamssen/51db74cb47b3e6a04924 to your computer and use it in GitHub Desktop.
Search Decorators in Angular2 Source Code

makeDecorator(

Decorators for class

@Injectable
class A {}
  • core.di.decorators
    • Injectable
  • core.metadata
    • Component
    • Directive
    • View
    • Pipe
  • router.lifecycle_annotations
    • CanActivate
  • router.route_config_decorator
    • RouteConfig

makePropDecorator(

Decorators for properties

class A {
  @Input property: any;
}
  • core.metadata
    • ContentChildren
    • ContentChild
    • ViewChidren
    • ViewChild
    • Input
    • Output
    • HostBinding
    • HostListener

makeParamDecorator(

Decorators function parameters

class A {
  constructor(@Inject('sample') sample: Sample) {}
}
  • core.di.decorators
    • Inject
    • Optional
    • Self
    • Host
    • SkipSelf
  • core.metadata
    • Attribute
    • Query
    • ViewQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment