I am using http://angular-ui.github.io/bootstrap/ (version .10). I need to open a simple modal window on event click of full-calendar (http://arshaw.com/fullcalendar/).
I do that using
select: function (start, end, allDay) {
console.log('Calendar select event fired');
var modalInstance = $modal.open({
templateUrl: 'template.html',
controller: function ($scope, $modalInstance) {
$scope.cancel = function () {
$modalInstance.dismiss('cancel');
};
},
});
This works first time and the modal opens and closes ok. However on 2nd click onwards the modal doesn't opens. The $modal.open is getting triggered and console shows no error.
The same exercise if it is done using ng-click works all time . This also need after writing a open function in controller.
<button class="btn btn-default" ng-click="open()">Open me!</button>
However my objective is to call the modal open from another directive using $modal.open.
What am I missing ?
appreciate your help.