use Promise instead of Future
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import {Type} from 'facade/lang';
|
||||
import {Future} from 'facade/async';
|
||||
import {Promise} from 'facade/async';
|
||||
import {Element} from 'facade/dom';
|
||||
//import {ProtoView} from './view';
|
||||
import {TemplateLoader} from './template_loader';
|
||||
@ -13,14 +13,14 @@ export class Compiler {
|
||||
}
|
||||
|
||||
/**
|
||||
* # Why future?
|
||||
* # Why promise?
|
||||
* - compilation will load templates. Instantiating views before templates are loaded will
|
||||
* 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
|
||||
*/
|
||||
compile(component:Type, element:Element/* = null*/):Future/*<ProtoView>*/ {
|
||||
compile(component:Type, element:Element/* = null*/):Promise/*<ProtoView>*/ {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
import {Future} from 'facade/async';
|
||||
import {Promise} from 'facade/async';
|
||||
//import {Document} from 'facade/dom';
|
||||
|
||||
export class TemplateLoader {
|
||||
|
||||
constructor() {}
|
||||
|
||||
load(url:String):Future/*<Document>*/ {
|
||||
load(url:String):Promise/*<Document>*/ {
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user