-
Notifications
You must be signed in to change notification settings - Fork 107
Adapter syntax does not support "controller as" syntax #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@GrzegorzzBB I commited one new demo on "controller as" syntax for you, it's available here. I believe it could help you. If not, please let us know... |
@dhilt Thank you for your response. I didn't had much time to take a look on it. This seems to work only if mainCtrl controller is bound to ui-scroll parent scope. In my case ui-scroll is nested: Desired scope is the yellow one. I can workaround this using some |
@GrzegorzzBB thanks! now I think I will be able to see the problem, let me try to solve it... |
@GrzegorzzBB just checked in changes so that you can use the |
@GrzegorzzBB the issue with nested scopes and "Controller As" syntax should go away after today's commits. Please try the latest source code https://github.com/angular-ui/ui-scroll/blob/master/src/ui-scroll.js. The template you posted above does not need to be modified. If there's still any problem please let us know, post details or create demo. |
@GrzegorzzBB v1.5.2 is released. Please try the latest and reopen the issue if needed. |
var match = expression.match(/^(\S+)(?:\s+on\s+(\w(?:\w|\d)*))?$/);
This is regexp used to find controller's scope by given controller name, but it doesn't support "controller as" syntax:
ng-controller="MainCtrl as mainCtrl"
ui-scroll.js 531:
var controller = candidate.attr('ng-controller');
This will make
{controller}
variable equalMainCtrl as mainCtrl
, which you can't define as adapter expression because regexp will fail.The text was updated successfully, but these errors were encountered: