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