Supports: - binds text nodes, element properties and directive properties - locates decorator, component and template directives. - inline templates of components The compiler is built using a pipeline design, see core/src/compiler/pipeline package. Integration tests to show how the compiler, change_detection and DI work together: core/test/compiler/integration_spec.js
27 lines
566 B
JavaScript
27 lines
566 B
JavaScript
// import {Type} from 'facade/lang';
|
|
// import {ElementServicesFunction} from './facade';
|
|
import {ABSTRACT, CONST} from 'facade/lang';
|
|
|
|
|
|
@ABSTRACT()
|
|
export class Directive {
|
|
@CONST()
|
|
constructor({
|
|
selector,
|
|
bind,
|
|
lightDomServices,
|
|
implementsTypes
|
|
}:{
|
|
selector:String,
|
|
bind:Object,
|
|
lightDomServices:ElementServicesFunction,
|
|
implementsTypes:Array<Type>
|
|
})
|
|
{
|
|
this.selector = selector;
|
|
this.lightDomServices = lightDomServices;
|
|
this.implementsTypes = implementsTypes;
|
|
this.bind = bind;
|
|
}
|
|
}
|