angular-cn/modules/angular2/docs/cheatsheet/directive-configuration.md
Kathy Walrath 3fd898e91f docs(cheatsheet): copyedit
Fixed a few little things. I'll probably have more changes to make later, once I understand everything better.

Also added a missing syntax line.

Closes #5806
2015-12-11 18:41:57 +00:00

665 B

@cheatsheetSection Directive configuration @cheatsheetIndex 5 @description {@target js ts}@Directive({ property1: value1, ... }){@endtarget} {@target dart}@Directive(property1: value1, ...){@endtarget}

@cheatsheetItem syntax: selector: '.cool-button:not(a)'|selector: description: Specifies a CSS selector that identifies this directive within a template. Supported selectors include element, [attribute], .class, and :not().

Does not support parent-child relationship selectors.

@cheatsheetItem syntax: providers: [MyService, provide(...)]|providers: description: Array of dependency injection providers for this directive and its children.