Skip to content
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

Allow the ControllerAs syntax #85

Closed
samudurand opened this issue Dec 7, 2014 · 9 comments
Closed

Allow the ControllerAs syntax #85

samudurand opened this issue Dec 7, 2014 · 9 comments
Assignees

Comments

@samudurand
Copy link

It would be really nice if it was possible to add a parameter allowing to set the 'ControllerAs' attribute of the modal. For a classic modal I would do something like :

function openListCreationForm() {
   var modalInstance = $modal.open({
   templateUrl: 'app/home/listCreationForm.tpl.html',
   controller: 'ListCreationModalController',
   controllerAs: 'lcf'
 });

 modalInstance.result.then(function () {
 }, function () {});
 }

for this project you could modify slightly your syntax with a parameter 'lcf' like this :

var dlgs = dialogs.create('app/home/listCreationForm.tpl.html', 'ListCreationModalController','lcf', {}, 'lg');

@m-e-conroy m-e-conroy self-assigned this Dec 29, 2014
@m-e-conroy
Copy link
Owner

I'll add this as a TODO, the service was created back when controllerAs wasn't available.

@samudurand
Copy link
Author

👍

@venil7
Copy link
Contributor

venil7 commented Dec 10, 2015

desperately need this functionality

@niemyjski
Copy link
Collaborator

Can you submit a pull request for this.

@venil7
Copy link
Contributor

venil7 commented Dec 10, 2015

#158

@niemyjski
Copy link
Collaborator

Change looks good to me. @samudurand can you test and verify it's good. Once I hear back I'll merge it.

@niemyjski
Copy link
Collaborator

Merged

@niemyjski
Copy link
Collaborator

@m-e-conroy 5.2.11 has been pushed

@m-e-conroy
Copy link
Owner

Sweet, thanks. Sorry haven't been able to participate much lately.
On Dec 10, 2015 12:07 PM, "Blake Niemyjski" notifications@github.com
wrote:

@m-e-conroy https://github.com/m-e-conroy 5.2.11 has been pushed


Reply to this email directly or view it on GitHub
#85 (comment)
.

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

No branches or pull requests

4 participants