@@ -77,23 +77,31 @@ export interface DirectiveDecorator {
77
77
new ( obj : Directive ) : Directive ;
78
78
}
79
79
80
+ /**
81
+ * Directive decorator and metadata.
82
+ *
83
+ * @Annotation
84
+ * @publicApi
85
+ */
80
86
export interface Directive {
81
87
/**
82
- * The CSS selector that triggers the instantiation of a directive.
88
+ * The CSS selector that identifies this directive in a template
89
+ * and triggers instantiation of the directive.
83
90
*
84
91
* Declare as one of the following:
85
92
*
86
- * - `element-name`: select by element name.
87
- * - `.class`: select by class name.
88
- * - `[attribute]`: select by attribute name.
89
- * - `[attribute=value]`: select by attribute name and value.
90
- * - `:not(sub_selector)`: select only if the element does not match the `sub_selector`.
91
- * - `selector1, selector2`: select if either `selector1` or `selector2` matches.
93
+ * - `element-name`: Select by element name.
94
+ * - `.class`: Select by class name.
95
+ * - `[attribute]`: Select by attribute name.
96
+ * - `[attribute=value]`: Select by attribute name and value.
97
+ * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
98
+ * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
92
99
*
93
- * Angular only allows directives to trigger on CSS selectors that do not cross element
94
- * boundaries. For example, consider a directive with an `input[type=text]` selector.
95
- * For the following HTML, the directive is instantiated only on the
96
- * `<input type="text">` element.
100
+ * Angular only allows directives to apply on CSS selectors that do not cross
101
+ * element boundaries.
102
+ *
103
+ * For the following template HTML, a directive with an `input[type=text]` selector,
104
+ * would be instantiated only on the `<input type="text">` element.
97
105
*
98
106
* ```html
99
107
* <form>
@@ -176,8 +184,9 @@ export interface Directive {
176
184
outputs ?: string [ ] ;
177
185
178
186
/**
179
- * A set of injection tokens that allow the DI system to
180
- * provide a dependency to this directive or component.
187
+ * Configures the [injector](guide/glossary#injector) of this
188
+ * directive or component with a [token](guide/glossary#di-token)
189
+ * that maps to a [provider](guide/glossary#provider) of a dependency.
181
190
*/
182
191
providers ?: Provider [ ] ;
183
192
@@ -247,62 +256,6 @@ export interface Directive {
247
256
*/
248
257
queries ?: { [ key : string ] : any } ;
249
258
250
- /**
251
- * If true, this directive/component will be skipped by the AOT compiler and so will always be
252
- * compiled using JIT.
253
- *
254
- * This exists to support future Ivy work and has no effect currently.
255
- */
256
- jit ?: true ;
257
- }
258
-
259
- /**
260
- * Directive decorator and metadata.
261
- *
262
- * @Annotation
263
- */
264
- export interface Directive {
265
- /**
266
- * The CSS selector that identifies this directive in a template
267
- * and triggers instantiation of the directive.
268
- *
269
- * Declare as one of the following:
270
- *
271
- * - `element-name`: Select by element name.
272
- * - `.class`: Select by class name.
273
- * - `[attribute]`: Select by attribute name.
274
- * - `[attribute=value]`: Select by attribute name and value.
275
- * - `:not(sub_selector)`: Select only if the element does not match the `sub_selector`.
276
- * - `selector1, selector2`: Select if either `selector1` or `selector2` matches.
277
- *
278
- * Angular only allows directives to apply on CSS selectors that do not cross
279
- * element boundaries.
280
- *
281
- * For the following template HTML, a directive with an `input[type=text]` selector,
282
- * would be instantiated only on the `<input type="text">` element.
283
- *
284
- * ```html
285
- * <form>
286
- * <input type="text">
287
- * <input type="radio">
288
- * <form>
289
- * ```
290
- *
291
- */
292
- selector ?: string ;
293
-
294
- /**
295
- * The set of event-bound output properties.
296
- * When an output property emits an event, an event handler attached
297
- * to that event in the template is invoked.
298
- *
299
- * Each output property maps a `directiveProperty` to a `bindingProperty`:
300
- * - `directiveProperty` specifies the component property that emits events.
301
- * - `bindingProperty` specifies the HTML attribute the event handler is attached to.
302
- *
303
- */
304
- outputs ?: string [ ] ;
305
-
306
259
/**
307
260
* Maps class properties to host element bindings for properties,
308
261
* attributes, and events, using a set of key-value pairs.
@@ -328,27 +281,12 @@ export interface Directive {
328
281
host ?: { [ key : string ] : string } ;
329
282
330
283
/**
331
- * Configures the [injector](guide/glossary#injector) of this
332
- * directive or component with a [token](guide/glossary#di-token)
333
- * that maps to a [provider](guide/glossary#provider) of a dependency.
334
- */
335
- providers ?: Provider [ ] ;
336
-
337
- /**
338
- * The name or names that can be used in the template to assign this directive to a variable.
339
- * For multiple names, use a comma-separated string.
340
- *
341
- */
342
- exportAs ?: string ;
343
-
344
- /**
345
- * Configures the queries that will be injected into the directive.
346
- *
347
- * Content queries are set before the `ngAfterContentInit` callback is called.
348
- * View queries are set before the `ngAfterViewInit` callback is called.
284
+ * If true, this directive/component will be skipped by the AOT compiler and so will always be
285
+ * compiled using JIT.
349
286
*
287
+ * This exists to support future Ivy work and has no effect currently.
350
288
*/
351
- queries ?: { [ key : string ] : any } ;
289
+ jit ?: true ;
352
290
}
353
291
354
292
/**
@@ -512,6 +450,8 @@ export interface ComponentDecorator {
512
450
513
451
/**
514
452
* Supplies configuration metadata for an Angular component.
453
+ *
454
+ * @publicApi
515
455
*/
516
456
export interface Component extends Directive {
517
457
/**
@@ -645,6 +585,8 @@ export interface PipeDecorator {
645
585
646
586
/**
647
587
* Type of the Pipe metadata.
588
+ *
589
+ * @publicApi
648
590
*/
649
591
export interface Pipe {
650
592
/**
@@ -704,7 +646,7 @@ export interface InputDecorator {
704
646
/**
705
647
* Type of metadata for an `Input` property.
706
648
*
707
- *
649
+ * @publicApi
708
650
*/
709
651
export interface Input {
710
652
/**
@@ -824,6 +766,8 @@ export interface OutputDecorator {
824
766
825
767
/**
826
768
* Type of the Output metadata.
769
+ *
770
+ * @publicApi
827
771
*/
828
772
export interface Output { bindingPropertyName ?: string ; }
829
773
@@ -879,6 +823,7 @@ export interface HostBindingDecorator {
879
823
/**
880
824
* Type of the HostBinding metadata.
881
825
*
826
+ * @publicApi
882
827
*/
883
828
export interface HostBinding { hostPropertyName ?: string ; }
884
829
@@ -902,6 +847,8 @@ export interface HostListenerDecorator {
902
847
903
848
/**
904
849
* Type of the HostListener metadata.
850
+ *
851
+ * @publicApi
905
852
*/
906
853
export interface HostListener {
907
854
/**
0 commit comments