2015-02-05 13:08:05 -08:00
|
|
|
import {CONST} from 'angular2/src/facade/lang';
|
|
|
|
|
import {DependencyAnnotation} from 'angular2/di';
|
2015-01-16 15:30:22 -08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The directive can inject an emitter function that would emit events onto the
|
|
|
|
|
* directive host element.
|
|
|
|
|
*/
|
|
|
|
|
export class EventEmitter extends DependencyAnnotation {
|
|
|
|
|
eventName: string;
|
|
|
|
|
@CONST()
|
|
|
|
|
constructor(eventName) {
|
2015-02-06 13:38:52 -08:00
|
|
|
super();
|
2015-01-16 15:30:22 -08:00
|
|
|
this.eventName = eventName;
|
|
|
|
|
}
|
2015-03-29 14:56:18 +02:00
|
|
|
|
|
|
|
|
get token() {
|
|
|
|
|
return Function;
|
|
|
|
|
}
|
2015-01-16 15:30:22 -08:00
|
|
|
}
|
2015-03-06 18:12:48 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The directive can inject a property setter that would allow setting this property on the
|
|
|
|
|
* host element
|
|
|
|
|
*/
|
|
|
|
|
export class PropertySetter extends DependencyAnnotation {
|
|
|
|
|
propName: string;
|
|
|
|
|
@CONST()
|
|
|
|
|
constructor(propName) {
|
|
|
|
|
super();
|
|
|
|
|
this.propName = propName;
|
|
|
|
|
}
|
2015-03-29 14:56:18 +02:00
|
|
|
|
|
|
|
|
get token() {
|
|
|
|
|
return Function;
|
|
|
|
|
}
|
2015-03-06 18:12:48 +01:00
|
|
|
}
|
2015-03-25 09:42:19 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* The directive can inject the value of an attribute of the host element
|
|
|
|
|
*/
|
|
|
|
|
export class Attribute extends DependencyAnnotation {
|
|
|
|
|
attributeName: string;
|
|
|
|
|
@CONST()
|
|
|
|
|
constructor(attributeName) {
|
|
|
|
|
super();
|
|
|
|
|
this.attributeName = attributeName;
|
|
|
|
|
}
|
|
|
|
|
}
|