Skip to content

Commit 5754b89

Browse files
committed
Fix error when controllerAs start from $. Eg default value for controllerAs in component is $ctrl
1 parent c3d30bb commit 5754b89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ui-scroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ angular.module('ui.scroll', [])
562562

563563
function link($scope, element, $attr, controllers, linker) {
564564

565-
const match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([\w\.]+)\s*$/);
565+
const match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([(\w|\$)\.]+)\s*$/);
566566

567567
if (!(match))
568568
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');

0 commit comments

Comments
 (0)