Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

controllerAs needs mentioning in service $controller of DeveloperGuide #10003

Closed
HenriqueLimas opened this issue Nov 11, 2014 · 2 comments
Closed

Comments

@HenriqueLimas
Copy link
Contributor

I was searching how can I use controllerAs using $controller service, but in the DeveloperGuide doesn't exist anything about that, but actually we can use with the service $controller, like $controller('myController as myController', locals). Is possible add something about that situation? May I make a PR?

@pkozlowski-opensource
Copy link
Member

@HenriqueLimas sure, send a PR with docs update - it is true that the controller as syntax isn't mentioned on https://docs.angularjs.org/api/ng/service/$controller. Just make sure that you note that $scope must be part of locals for this syntax to work.

@pkozlowski-opensource
Copy link
Member

This one was solved by fa0d8c4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants