refactor(compiler): refactor template binding parsing (#23460)

A long time ago Angular used to support both those attribute notations:
- `*attr='binding'`
- `template=`attr: binding`

Because the last notation has been dropped we can refactor the binding parsing.
Source maps will benefit from that as no `attr:` prefix is added artificialy any
more.

PR Close #23460
This commit is contained in:
Victor Berchet
2018-04-19 17:23:27 -07:00
parent ca776c59dd
commit 4662878a1f
7 changed files with 557 additions and 573 deletions

View File

@ -215,7 +215,7 @@ export class ASTWithSource extends AST {
export class TemplateBinding {
constructor(
public span: ParseSpan, public key: string, public keyIsVar: boolean, public name: string,
public expression: ASTWithSource) {}
public expression: ASTWithSource|null) {}
}
export interface AstVisitor {