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

Passing a controller constructor #61

Closed
maxdow opened this issue Apr 5, 2015 · 0 comments · Fixed by #74
Closed

Passing a controller constructor #61

maxdow opened this issue Apr 5, 2015 · 0 comments · Fixed by #74

Comments

@maxdow
Copy link
Contributor

maxdow commented Apr 5, 2015

In the current system, and if i understand it, to use a custom modal, you have to pass a controller already created :

app.controler("SomeController", function($scope, close) {
 $scope.dismissModal = function(result) {
    close(result, 200); 
 };
});
ModalService.showModal({
  templateUrl: "some/template.html",
  controller: "SomeController"
});

I can't find a way to do this without changing the code :

ModalService.showModal({
  templateUrl: "some/template.html",
  controller: function($scope, close) {
      $scope.dismissModal = function(result) {
         close(result, 200); 
      };
  }
});

Do you plan to add this feature ?

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

Successfully merging a pull request may close this issue.

1 participant