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-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;
|
|
|
|
|
}
|
|
|
|
|
}
|