feat(change_detection): change binding syntax to explicitly specify pipes
This commit is contained in:
@@ -14,6 +14,7 @@ import {
|
||||
PrefixNot,
|
||||
Conditional,
|
||||
Formatter,
|
||||
Pipe,
|
||||
Assignment,
|
||||
Chain,
|
||||
KeyedAccess,
|
||||
@@ -52,6 +53,15 @@ export class Parser {
|
||||
return new ASTWithSource(ast, input, location);
|
||||
}
|
||||
|
||||
addPipes(bindingAst:ASTWithSource, pipes:List<String>):ASTWithSource {
|
||||
if (ListWrapper.isEmpty(pipes)) return bindingAst;
|
||||
|
||||
var res = ListWrapper.reduce(pipes,
|
||||
(result, currentPipeName) => new Pipe(result, currentPipeName),
|
||||
bindingAst.ast);
|
||||
return new ASTWithSource(res, bindingAst.source, bindingAst.location);
|
||||
}
|
||||
|
||||
parseTemplateBindings(input:string, location:any):List<TemplateBinding> {
|
||||
var tokens = this._lexer.tokenize(input);
|
||||
return new _ParseAST(input, location, tokens, this._reflector, false).parseTemplateBindings();
|
||||
|
||||
Reference in New Issue
Block a user