We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cea616 commit c175656Copy full SHA for c175656
src/ui-scroll.js
@@ -506,7 +506,9 @@ angular.module('ui.scroll', [])
506
let scope = viewportScope;
507
let assign;
508
if (expression) {
509
- let match = expression.match(/(\w(?:\w|\d)*)(?:\s+on\s+(\w(?:\w|\d)*))?/);
+ // it is ok to have relaxed validation for the first part of the 'on' expression.
510
+ // additional validation will be done by the $parse service below
511
+ let match = expression.match(/^(\S+)(?:\s+on\s+(\w(?:\w|\d)*))?/);
512
if (!match)
513
throw new Error('Expected injection expression in form of \'target\' or \'target on controller\' but got \'' + expression + '\'');
514
let target = match[1];
0 commit comments