angular-cn/modules/angular2/docs/cheatsheet/directive-configuration.md

20 lines
577 B
Markdown
Raw Normal View History

2015-11-06 07:26:24 -05:00
@cheatsheetSection
Directive configuration
@cheatsheetIndex 5
2015-11-06 07:26:24 -05:00
@description
2015-11-05 10:04:55 -05:00
`@Directive({ property1: value1, ... }) )`
@cheatsheetItem
syntax:
2015-11-05 10:04:55 -05:00
`selector: '.cool-button:not(a)'`|`selector:`
description:
2015-11-05 10:04:55 -05:00
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:
2015-11-05 10:04:55 -05:00
`providers: [MyService, provide(...)]`|`providers:`
description:
2015-11-05 10:04:55 -05:00
Array of dependency injection providers for this directive and its children.