2015-08-14 10:03:45 -07:00
|
|
|
/**
|
|
|
|
* This indirection is needed to free up Component, etc symbols in the public API
|
|
|
|
* to be used by the decorator versions of these annotations.
|
|
|
|
*/
|
|
|
|
|
|
|
|
export {
|
|
|
|
QueryMetadata,
|
|
|
|
ViewQueryMetadata,
|
|
|
|
AttributeMetadata,
|
|
|
|
} from './metadata/di';
|
|
|
|
|
|
|
|
export {
|
|
|
|
ComponentMetadata,
|
|
|
|
DirectiveMetadata,
|
|
|
|
PipeMetadata,
|
2015-09-03 15:10:48 -07:00
|
|
|
PropertyMetadata,
|
2015-09-04 14:07:16 -07:00
|
|
|
EventMetadata,
|
|
|
|
HostBindingMetadata,
|
|
|
|
HostListenerMetadata
|
2015-08-14 10:03:45 -07:00
|
|
|
} from './metadata/directives';
|
|
|
|
|
|
|
|
export {ViewMetadata, ViewEncapsulation} from './metadata/view';
|
|
|
|
|
|
|
|
import {
|
|
|
|
QueryMetadata,
|
|
|
|
ViewQueryMetadata,
|
|
|
|
AttributeMetadata,
|
|
|
|
} from './metadata/di';
|
|
|
|
|
2015-08-07 11:41:38 -07:00
|
|
|
import {
|
2015-08-14 10:03:45 -07:00
|
|
|
ComponentMetadata,
|
|
|
|
DirectiveMetadata,
|
|
|
|
PipeMetadata,
|
2015-09-03 15:10:48 -07:00
|
|
|
PropertyMetadata,
|
2015-09-04 14:07:16 -07:00
|
|
|
EventMetadata,
|
|
|
|
HostBindingMetadata,
|
|
|
|
HostListenerMetadata
|
2015-08-14 10:03:45 -07:00
|
|
|
} from './metadata/directives';
|
|
|
|
|
|
|
|
import {ViewMetadata, ViewEncapsulation} from './metadata/view';
|
2015-08-26 11:44:59 -07:00
|
|
|
import {ChangeDetectionStrategy} from 'angular2/src/core/change_detection/change_detection';
|
2015-08-14 10:03:45 -07:00
|
|
|
|
2015-09-03 15:10:48 -07:00
|
|
|
import {
|
|
|
|
makeDecorator,
|
|
|
|
makeParamDecorator,
|
|
|
|
makePropDecorator,
|
|
|
|
TypeDecorator,
|
|
|
|
Class
|
|
|
|
} from './util/decorators';
|
2015-08-20 14:28:25 -07:00
|
|
|
import {Type} from 'angular2/src/core/facade/lang';
|
2015-06-12 23:51:42 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* Interface for the {@link DirectiveMetadata} decorator function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* See {@link DirectiveFactory}.
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface DirectiveDecorator extends TypeDecorator {}
|
2015-06-12 23:51:42 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* Interface for the {@link ComponentMetadata} decorator function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* See {@link ComponentFactory}.
|
|
|
|
*/
|
|
|
|
export interface ComponentDecorator extends TypeDecorator {
|
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* Chain {@link ViewMetadata} annotation.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-07-07 22:09:19 +02:00
|
|
|
View(obj: {
|
|
|
|
templateUrl?: string,
|
|
|
|
template?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
directives?: Array<Type | any | any[]>,
|
|
|
|
pipes?: Array<Type | any | any[]>,
|
2015-07-07 22:09:19 +02:00
|
|
|
renderer?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
styles?: string[],
|
|
|
|
styleUrls?: string[],
|
2015-07-07 22:09:19 +02:00
|
|
|
}): ViewDecorator;
|
2015-07-07 08:15:58 +02:00
|
|
|
}
|
2015-06-12 23:51:42 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* Interface for the {@link ViewMetadata} decorator function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* See {@link ViewFactory}.
|
|
|
|
*/
|
|
|
|
export interface ViewDecorator extends TypeDecorator {
|
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* Chain {@link ViewMetadata} annotation.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-07-07 22:09:19 +02:00
|
|
|
View(obj: {
|
|
|
|
templateUrl?: string,
|
|
|
|
template?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
directives?: Array<Type | any | any[]>,
|
|
|
|
pipes?: Array<Type | any | any[]>,
|
2015-07-07 22:09:19 +02:00
|
|
|
renderer?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
styles?: string[],
|
|
|
|
styleUrls?: string[],
|
2015-07-15 12:12:23 -07:00
|
|
|
}): ViewDecorator;
|
2015-07-07 08:15:58 +02:00
|
|
|
}
|
2015-06-12 23:51:42 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link DirectiveMetadata} factory for creating annotations, decorators or DSL.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Directive} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Directive({...})
|
|
|
|
* class MyDirective {
|
|
|
|
* constructor() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 DSL
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyDirective = ng
|
|
|
|
* .Directive({...})
|
|
|
|
* .Class({
|
|
|
|
* constructor: function() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* })
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 annotation
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyDirective = function() {
|
|
|
|
* ...
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* MyDirective.annotations = [
|
|
|
|
* new ng.Directive({...})
|
|
|
|
* ]
|
|
|
|
* ```
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface DirectiveFactory {
|
2015-07-07 22:09:19 +02:00
|
|
|
(obj: {
|
2015-08-28 11:29:19 -07:00
|
|
|
selector?: string, properties?: string[], events?: string[], host?: StringMap<string, string>,
|
2015-08-31 18:32:32 -07:00
|
|
|
bindings?: any[], exportAs?: string, compileChildren?: boolean;
|
2015-07-07 22:09:19 +02:00
|
|
|
}): DirectiveDecorator;
|
|
|
|
new (obj: {
|
2015-08-28 11:29:19 -07:00
|
|
|
selector?: string, properties?: string[], events?: string[], host?: StringMap<string, string>,
|
2015-08-31 18:32:32 -07:00
|
|
|
bindings?: any[], exportAs?: string, compileChildren?: boolean;
|
2015-08-14 10:03:45 -07:00
|
|
|
}): DirectiveMetadata;
|
2015-06-12 23:51:42 -07:00
|
|
|
}
|
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
|
|
|
* {@link ComponentAnnotation} factory for creating annotations, decorators or DSL.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Component, View} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Component({...})
|
|
|
|
* @View({...})
|
|
|
|
* class MyComponent {
|
|
|
|
* constructor() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 DSL
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = ng
|
|
|
|
* .Component({...})
|
|
|
|
* .View({...})
|
|
|
|
* .Class({
|
|
|
|
* constructor: function() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* })
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 annotation
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = function() {
|
|
|
|
* ...
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* MyComponent.annotations = [
|
2015-08-19 11:42:59 +02:00
|
|
|
* new ng.Component({...}),
|
2015-07-07 08:15:58 +02:00
|
|
|
* new ng.View({...})
|
|
|
|
* ]
|
|
|
|
* ```
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface ComponentFactory {
|
2015-07-07 22:09:19 +02:00
|
|
|
(obj: {
|
|
|
|
selector?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
properties?: string[],
|
|
|
|
events?: string[],
|
2015-07-07 22:09:19 +02:00
|
|
|
host?: StringMap<string, string>,
|
2015-08-28 11:29:19 -07:00
|
|
|
bindings?: any[],
|
2015-07-07 22:09:19 +02:00
|
|
|
exportAs?: string,
|
|
|
|
compileChildren?: boolean,
|
2015-08-28 11:29:19 -07:00
|
|
|
viewBindings?: any[],
|
2015-08-26 11:44:59 -07:00
|
|
|
changeDetection?: ChangeDetectionStrategy,
|
2015-07-07 22:09:19 +02:00
|
|
|
}): ComponentDecorator;
|
|
|
|
new (obj: {
|
|
|
|
selector?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
properties?: string[],
|
|
|
|
events?: string[],
|
2015-07-07 22:09:19 +02:00
|
|
|
host?: StringMap<string, string>,
|
2015-08-28 11:29:19 -07:00
|
|
|
bindings?: any[],
|
2015-07-07 22:09:19 +02:00
|
|
|
exportAs?: string,
|
|
|
|
compileChildren?: boolean,
|
2015-08-28 11:29:19 -07:00
|
|
|
viewBindings?: any[],
|
2015-08-26 11:44:59 -07:00
|
|
|
changeDetection?: ChangeDetectionStrategy,
|
2015-08-14 10:03:45 -07:00
|
|
|
}): ComponentMetadata;
|
2015-06-12 23:51:42 -07:00
|
|
|
}
|
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
|
|
|
* {@link ViewAnnotation} factory for creating annotations, decorators or DSL.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Component, View} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Component({...})
|
|
|
|
* @View({...})
|
|
|
|
* class MyComponent {
|
|
|
|
* constructor() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 DSL
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = ng
|
|
|
|
* .Component({...})
|
|
|
|
* .View({...})
|
|
|
|
* .Class({
|
|
|
|
* constructor: function() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* })
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 annotation
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = function() {
|
|
|
|
* ...
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* MyComponent.annotations = [
|
2015-08-19 11:42:59 +02:00
|
|
|
* new ng.Component({...}),
|
2015-07-07 08:15:58 +02:00
|
|
|
* new ng.View({...})
|
|
|
|
* ]
|
|
|
|
* ```
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface ViewFactory {
|
2015-07-07 22:09:19 +02:00
|
|
|
(obj: {
|
|
|
|
templateUrl?: string,
|
|
|
|
template?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
directives?: Array<Type | any | any[]>,
|
2015-07-24 15:28:44 -07:00
|
|
|
encapsulation?: ViewEncapsulation,
|
2015-08-28 11:29:19 -07:00
|
|
|
styles?: string[],
|
|
|
|
styleUrls?: string[],
|
2015-07-07 22:09:19 +02:00
|
|
|
}): ViewDecorator;
|
|
|
|
new (obj: {
|
|
|
|
templateUrl?: string,
|
|
|
|
template?: string,
|
2015-08-28 11:29:19 -07:00
|
|
|
directives?: Array<Type | any | any[]>,
|
2015-07-24 15:28:44 -07:00
|
|
|
encapsulation?: ViewEncapsulation,
|
2015-08-28 11:29:19 -07:00
|
|
|
styles?: string[],
|
|
|
|
styleUrls?: string[],
|
2015-08-14 10:03:45 -07:00
|
|
|
}): ViewMetadata;
|
2015-06-12 23:51:42 -07:00
|
|
|
}
|
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link AttributeMetadata} factory for creating annotations, decorators or DSL.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Attribute, Component, View} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Component({...})
|
|
|
|
* @View({...})
|
|
|
|
* class MyComponent {
|
|
|
|
* constructor(@Attribute('title') title: string) {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 DSL
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = ng
|
|
|
|
* .Component({...})
|
|
|
|
* .View({...})
|
|
|
|
* .Class({
|
|
|
|
* constructor: [new ng.Attribute('title'), function(title) {
|
|
|
|
* ...
|
|
|
|
* }]
|
|
|
|
* })
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 annotation
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = function(title) {
|
|
|
|
* ...
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* MyComponent.annotations = [
|
2015-08-19 11:42:59 +02:00
|
|
|
* new ng.Component({...}),
|
2015-07-07 08:15:58 +02:00
|
|
|
* new ng.View({...})
|
|
|
|
* ]
|
|
|
|
* MyComponent.parameters = [
|
|
|
|
* [new ng.Attribute('title')]
|
|
|
|
* ]
|
|
|
|
* ```
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface AttributeFactory {
|
|
|
|
(name: string): TypeDecorator;
|
2015-08-14 10:03:45 -07:00
|
|
|
new (name: string): AttributeMetadata;
|
2015-07-02 22:26:07 +02:00
|
|
|
}
|
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link QueryMetadata} factory for creating annotations, decorators or DSL.
|
2015-07-07 08:15:58 +02:00
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Query, QueryList, Component, View} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Component({...})
|
|
|
|
* @View({...})
|
|
|
|
* class MyComponent {
|
|
|
|
* constructor(@Query(SomeType) queryList: QueryList) {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 DSL
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = ng
|
|
|
|
* .Component({...})
|
|
|
|
* .View({...})
|
|
|
|
* .Class({
|
|
|
|
* constructor: [new ng.Query(SomeType), function(queryList) {
|
|
|
|
* ...
|
|
|
|
* }]
|
|
|
|
* })
|
|
|
|
* ```
|
|
|
|
*
|
|
|
|
* ## Example as ES5 annotation
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* var MyComponent = function(queryList) {
|
|
|
|
* ...
|
|
|
|
* };
|
|
|
|
*
|
|
|
|
* MyComponent.annotations = [
|
2015-08-19 11:42:59 +02:00
|
|
|
* new ng.Component({...}),
|
2015-07-07 08:15:58 +02:00
|
|
|
* new ng.View({...})
|
|
|
|
* ]
|
|
|
|
* MyComponent.parameters = [
|
|
|
|
* [new ng.Query(SomeType)]
|
|
|
|
* ]
|
|
|
|
* ```
|
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export interface QueryFactory {
|
|
|
|
(selector: Type | string, {descendants}?: {descendants?: boolean}): ParameterDecorator;
|
2015-08-14 10:03:45 -07:00
|
|
|
new (selector: Type | string, {descendants}?: {descendants?: boolean}): QueryMetadata;
|
2015-07-02 22:26:07 +02:00
|
|
|
}
|
|
|
|
|
2015-08-07 11:41:38 -07:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link PipeMetadata} factory for creating decorators.
|
2015-08-07 11:41:38 -07:00
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* import {Pipe} from "angular2/angular2";
|
|
|
|
*
|
|
|
|
* @Pipe({...})
|
|
|
|
* class MyPipe {
|
|
|
|
* constructor() {
|
|
|
|
* ...
|
|
|
|
* }
|
|
|
|
*
|
|
|
|
* transform(v, args) {}
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
export interface PipeFactory {
|
2015-09-08 09:17:58 -07:00
|
|
|
(obj: {name: string, pure?: boolean}): any;
|
|
|
|
new (obj: {name: string, pure?: boolean}): any;
|
2015-08-07 11:41:38 -07:00
|
|
|
}
|
2015-05-04 11:11:22 -07:00
|
|
|
|
2015-09-03 15:10:48 -07:00
|
|
|
/**
|
|
|
|
* {@link PropertyMetadata} factory for creating decorators.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* @Directive({
|
|
|
|
* selector: 'sample-dir'
|
|
|
|
* })
|
|
|
|
* class SampleDir {
|
|
|
|
* @Property() property; // Same as @Property('property') property;
|
|
|
|
* @Property("el-property") dirProperty;
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
export interface PropertyFactory {
|
|
|
|
(bindingPropertyName?: string): any;
|
|
|
|
new (bindingPropertyName?: string): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link EventMetadata} factory for creating decorators.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* @Directive({
|
|
|
|
* selector: 'sample-dir'
|
|
|
|
* })
|
|
|
|
* class SampleDir {
|
|
|
|
* @Event() event = new EventEmitter(); // Same as @Event('event') event = new EventEmitter();
|
|
|
|
* @Event("el-event") dirEvent = new EventEmitter();
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
export interface EventFactory {
|
|
|
|
(bindingPropertyName?: string): any;
|
|
|
|
new (bindingPropertyName?: string): any;
|
|
|
|
}
|
|
|
|
|
2015-09-04 14:07:16 -07:00
|
|
|
/**
|
|
|
|
* {@link HostBindingMetadata} factory for creating decorators.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* @Directive({
|
|
|
|
* selector: 'sample-dir'
|
|
|
|
* })
|
|
|
|
* class SampleDir {
|
|
|
|
* @HostBinding() prop1; // Same as @HostBinding('prop1') prop1;
|
|
|
|
* @HostBinding("el-prop") prop1;
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
export interface HostBindingFactory {
|
|
|
|
(hostPropertyName?: string): any;
|
|
|
|
new (hostPropertyName?: string): any;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link HostListenerMetadata} factory for creating decorators.
|
|
|
|
*
|
|
|
|
* ## Example as TypeScript Decorator
|
|
|
|
*
|
|
|
|
* ```
|
|
|
|
* @Directive({
|
|
|
|
* selector: 'sample-dir'
|
|
|
|
* })
|
|
|
|
* class SampleDir {
|
|
|
|
* @HostListener("change", ['$event.target.value']) onChange(value){}
|
|
|
|
* }
|
|
|
|
* ```
|
|
|
|
*/
|
|
|
|
export interface HostListenerFactory {
|
|
|
|
(eventName: string, args?: string[]): any;
|
|
|
|
new (eventName: string, args?: string[]): any;
|
|
|
|
}
|
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link ComponentMetadata} factory function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export var Component: ComponentFactory =
|
2015-08-14 10:03:45 -07:00
|
|
|
<ComponentFactory>makeDecorator(ComponentMetadata, (fn: any) => fn.View = View);
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link DirectiveMetadata} factory function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-08-14 10:03:45 -07:00
|
|
|
export var Directive: DirectiveFactory = <DirectiveFactory>makeDecorator(DirectiveMetadata);
|
2015-05-04 11:11:22 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link ViewMetadata} factory function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-07-02 22:26:07 +02:00
|
|
|
export var View: ViewFactory =
|
2015-08-14 10:03:45 -07:00
|
|
|
<ViewFactory>makeDecorator(ViewMetadata, (fn: any) => fn.View = View);
|
2015-05-04 11:11:22 -07:00
|
|
|
|
2015-07-07 08:15:58 +02:00
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link AttributeMetadata} factory function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-08-14 10:03:45 -07:00
|
|
|
export var Attribute: AttributeFactory = makeParamDecorator(AttributeMetadata);
|
2015-07-07 08:15:58 +02:00
|
|
|
|
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link QueryMetadata} factory function.
|
2015-07-07 08:15:58 +02:00
|
|
|
*/
|
2015-08-14 10:03:45 -07:00
|
|
|
export var Query: QueryFactory = makeParamDecorator(QueryMetadata);
|
2015-07-10 10:30:31 -07:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
2015-08-18 16:32:56 -07:00
|
|
|
* {@link di/ViewQueryMetadata} factory function.
|
2015-07-10 10:30:31 -07:00
|
|
|
*/
|
2015-08-14 10:03:45 -07:00
|
|
|
export var ViewQuery: QueryFactory = makeParamDecorator(ViewQueryMetadata);
|
2015-08-07 11:41:38 -07:00
|
|
|
|
|
|
|
/**
|
2015-08-14 10:03:45 -07:00
|
|
|
* {@link PipeMetadata} factory function.
|
2015-08-07 11:41:38 -07:00
|
|
|
*/
|
2015-08-14 10:03:45 -07:00
|
|
|
export var Pipe: PipeFactory = <PipeFactory>makeDecorator(PipeMetadata);
|
2015-09-03 15:10:48 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link PropertyMetadata} factory function.
|
|
|
|
*/
|
|
|
|
export var Property: PropertyFactory = makePropDecorator(PropertyMetadata);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link EventMetadata} factory function.
|
|
|
|
*/
|
2015-09-04 14:07:16 -07:00
|
|
|
export var Event: EventFactory = makePropDecorator(EventMetadata);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link HostBindingMetadata} factory function.
|
|
|
|
*/
|
|
|
|
export var HostBinding: HostBindingFactory = makePropDecorator(HostBindingMetadata);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@link HostListenerMetadata} factory function.
|
|
|
|
*/
|
2015-08-31 18:32:32 -07:00
|
|
|
export var HostListener: HostListenerFactory = makePropDecorator(HostListenerMetadata);
|