29 lines
893 B
JavaScript
Raw Normal View History

import {Type} from 'facade/lang';
2014-10-10 15:44:56 -04:00
import {Promise} from 'facade/async';
import {Element} from 'facade/dom';
//import {ProtoView} from './view';
import {TemplateLoader} from './template_loader';
import {FIELD} from 'facade/lang';
2014-09-19 23:03:36 +00:00
export class Compiler {
@FIELD('final _templateLoader:TemplateLoader')
constructor(templateLoader:TemplateLoader) {
this._templateLoader = templateLoader;
}
2014-09-19 23:03:36 +00:00
/**
2014-10-10 15:44:56 -04:00
* # Why promise?
* - compilation will load templates. Instantiating views before templates are loaded will
2014-09-19 23:03:36 +00:00
* complicate the Directive code. BENEFIT: view instantiation become synchrnous.
* # Why result that is independent of injector?
* - don't know about injector in deserialization
* - compile does not need the injector, only the ViewFactory does
*/
2014-10-10 15:44:56 -04:00
compile(component:Type, element:Element/* = null*/):Promise/*<ProtoView>*/ {
return null;
2014-09-19 23:03:36 +00:00
}
2014-09-28 16:29:11 -07:00
}