@@ -2,11 +2,17 @@ import {CONST} from 'angular2/src/facade/lang';
22import { DependencyAnnotation } from 'angular2/di' ;
33
44/**
5- * The directive can inject an emitter function that would emit events onto the
6- * directive host element.
5+ * Specifies that a function for emitting events should be injected.
6+ *
7+ * NOTE: This is changing pre 1.0.
8+ *
9+ * The directive can inject an emitter function that would emit events onto the directive host element.
10+ *
11+ * @exportedAs angular2/annotations
712 */
813export class EventEmitter extends DependencyAnnotation {
914 eventName : string ;
15+
1016 @CONST ( )
1117 constructor ( eventName ) {
1218 super ( ) ;
@@ -19,8 +25,13 @@ export class EventEmitter extends DependencyAnnotation {
1925}
2026
2127/**
22- * The directive can inject a property setter that would allow setting this property on the
23- * host element
28+ * Specifies that a function for setting host properties should be injected.
29+ *
30+ * NOTE: This is changing pre 1.0.
31+ *
32+ * The directive can inject a property setter that would allow setting this property on the host element.
33+ *
34+ * @exportedAs angular2/annotations
2435 */
2536export class PropertySetter extends DependencyAnnotation {
2637 propName : string ;
@@ -36,7 +47,32 @@ export class PropertySetter extends DependencyAnnotation {
3647}
3748
3849/**
39- * The directive can inject the value of an attribute of the host element
50+ * Specifies that a constant attribute value should be injected.
51+ *
52+ * The directive can inject constant string literals of host element attributes.
53+ *
54+ * ## Example
55+ *
56+ * suppose we have an `<input>` element and would like to know its `type`.
57+ *
58+ * ```html
59+ * <input type="text">
60+ * ```
61+ *
62+ * A decorator could inject string literal `text` like so:
63+ *
64+ * ```javascript
65+ * @Decorator ({
66+ * selector: `input'
67+ * })
68+ * class InputDecorator {
69+ * constructor(@Attribute ('type') type) {
70+ * // type would be `text` in this example
71+ * }
72+ * }
73+ * ```
74+ *
75+ * @exportedAs angular2/annotations
4076 */
4177export class Attribute extends DependencyAnnotation {
4278 attributeName : string ;
@@ -56,7 +92,11 @@ export class Attribute extends DependencyAnnotation {
5692}
5793
5894/**
59- * The directive can inject an query that would reflect a list of ancestor directives
95+ * Specifies that a [QueryList] should be injected.
96+ *
97+ * See: [QueryList] for usage.
98+ *
99+ * @exportedAs angular2/annotations
60100 */
61101export class Query extends DependencyAnnotation {
62102 directive ;
0 commit comments