File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {CompileControl} from './compile_control';
1111import { interpolationToExpression } from './text_interpolation_parser' ;
1212
1313// TODO(tbosch): Cannot make this const/final right now because of the transpiler...
14- var BIND_NAME_REGEXP = RegExpWrapper . create ( '^(?:(?:(bind)|(let)|(on))-(.+))|\\[([^\\]]+)\\]|\\(([^\\] ]+)\\)' ) ;
14+ var BIND_NAME_REGEXP = RegExpWrapper . create ( '^(?:(?:(bind)|(let)|(on))-(.+))|\\[([^\\]]+)\\]|\\(([^\\) ]+)\\)' ) ;
1515
1616/**
1717 * Parses the property bindings on a single element.
Original file line number Diff line number Diff line change @@ -43,6 +43,10 @@ export function main() {
4343 it ( 'should detect () syntax' , ( ) => {
4444 var results = createPipeline ( ) . process ( createElement ( '<div (click)="b()"></div>' ) ) ;
4545 expect ( MapWrapper . get ( results [ 0 ] . eventBindings , 'click' ) . source ) . toEqual ( 'b()' ) ;
46+ // "(click[])" is not an expected syntax and is only used to validate the regexp
47+ results = createPipeline ( ) . process ( createElement ( '<div (click[])="b()"></div>' ) ) ;
48+ expect ( MapWrapper . get ( results [ 0 ] . eventBindings , 'click[]' ) . source ) . toEqual ( 'b()' ) ;
49+
4650 } ) ;
4751
4852 it ( 'should detect on- syntax' , ( ) => {
You can’t perform that action at this time.
0 commit comments