I'm utilizing multiple modals to guide users through a single form right now, and I've pretty much created a directive that opens/closes a modal for each modal. I've done something like this:
.directive('firstModal', function() { // Series of directives used to open/close target modals
return {
restrict: 'A',
link: function(scope, element, attr) {
scope.dismissFirst = function() {
element.modal('hide');
};
scope.showFirst = function() {
element.modal('show');
};
}
};
}
I've taken a look at both ui.bootstrap and angular-strap, but both are used for Bootstrap 3.x - this site still runs on Bootstrap 2.3, so I don't think I'll be utilizing either of those two options until we upgrade the site. My question is, is there a way to handle all opening/closing of modals from a single directive?