File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -506,7 +506,7 @@ angular.module('ui.scroll', [])
506506 let scope = viewportScope ;
507507 let assign ;
508508 if ( expression ) {
509- let match = expression . match ( / ^ ( \S + ) (?: \s + o n \s + ( \w (?: \w | \d ) * ) ) ? $ / ) ;
509+ let match = expression . match ( / ( \w (?: \w | \d ) * ) (?: \s + o n \s + ( \w (?: \w | \d ) * ) ) ? / ) ;
510510 if ( ! match )
511511 throw new Error ( 'Expected injection expression in form of \'target\' or \'target on controller\' but got \'' + expression + '\'' ) ;
512512 let target = match [ 1 ] ;
@@ -515,8 +515,8 @@ angular.module('ui.scroll', [])
515515 let candidate = viewport ;
516516 scope = undefined ;
517517 while ( candidate . length ) {
518- let controller = candidate . attr ( 'ng-controller' ) ;
519- if ( controller === controllerName ) {
518+ let candidateName = ( candidate . attr ( 'ng-controller' ) || '' ) . match ( / ( \w (?: \w | \d ) * ) (?: \s + a s \s + ( \w (?: \w | \d ) * ) ) ? / ) ;
519+ if ( candidateName && candidateName [ 1 ] === controllerName ) {
520520 scope = candidate . scope ( ) ;
521521 break ;
522522 }
You can’t perform that action at this time.
0 commit comments