2015-11-06 07:26:24 -05:00
|
|
|
@cheatsheetSection
|
|
|
|
Directive configuration
|
2015-11-13 02:14:12 -05:00
|
|
|
@cheatsheetIndex 5
|
2015-11-06 07:26:24 -05:00
|
|
|
@description
|
2015-12-12 22:17:26 -05:00
|
|
|
{@target ts}`@Directive({ property1: value1, ... })`{@endtarget}
|
|
|
|
{@target js}`ng.core.Directive({ property1: value1, ... }).Class({...})`{@endtarget}
|
2015-12-09 13:22:40 -05:00
|
|
|
{@target dart}`@Directive(property1: value1, ...)`{@endtarget}
|
2015-11-05 10:04:55 -05:00
|
|
|
|
|
|
|
@cheatsheetItem
|
2015-12-09 07:33:42 -05:00
|
|
|
syntax:
|
2015-11-05 10:04:55 -05:00
|
|
|
`selector: '.cool-button:not(a)'`|`selector:`
|
2015-12-09 07:33:42 -05:00
|
|
|
description:
|
2015-12-10 12:52:19 -05:00
|
|
|
Specifies a CSS selector that identifies this directive within a template. Supported selectors include `element`,
|
2015-11-05 10:04:55 -05:00
|
|
|
`[attribute]`, `.class`, and `:not()`.
|
|
|
|
|
|
|
|
Does not support parent-child relationship selectors.
|
|
|
|
|
|
|
|
@cheatsheetItem
|
2015-12-12 22:17:26 -05:00
|
|
|
syntax(ts dart):
|
2015-11-05 10:04:55 -05:00
|
|
|
`providers: [MyService, provide(...)]`|`providers:`
|
2015-12-12 22:17:26 -05:00
|
|
|
syntax(js):
|
|
|
|
`providers: [MyService, ng.core.provide(...)]`|`providers:`
|
2015-12-09 07:33:42 -05:00
|
|
|
description:
|
2015-12-09 13:22:40 -05:00
|
|
|
Array of dependency injection providers for this directive and its children.
|