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

how can I close the modal in the controller #6

Closed
jeeeez opened this issue Jul 20, 2015 · 3 comments
Closed

how can I close the modal in the controller #6

jeeeez opened this issue Jul 20, 2015 · 3 comments

Comments

@jeeeez
Copy link

jeeeez commented Jul 20, 2015

how can I close the modal in the controller

@LukaszWatroba
Copy link
Owner

You simply need to call deactivate method.

myApp.controller('MyController', function ($scope, myModal) {
  var ctrl = this;

  function closeMyModal () {
    myModal.deactivate();
  }

  ctrl.close = closeMyModal;
});

@jeeeez
Copy link
Author

jeeeez commented Jul 22, 2015

var myModal = vModal({
controller:function($scope){
$scope.close=function(){
// I want to close this modal here.
// Looking forward to your reply
// thx
}
}
});

@LukaszWatroba
Copy link
Owner

@li2274221 please, take a look at the demo app module here. I think you're doing something wrong.

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

No branches or pull requests

2 participants