Before / After hook for events before/after activate/deactivate
phillip-haydon opened this issue · comments
Throwing an idea out there:
I would like to be able to do something along the lines of:
angular.module('MyApp')
.factory('libraryModal', function(btfModal) {
return btfModal({
controller: '...',
controllerAs: 'modal',
templateUrl: '...',
beforeActivate: function() {
....
},
afterDeactivate: function() {
....
}
});
});
The scenario I have is when I go full screen I want to do two things:
- Hide scroll bars on the body of the document
- Hide thumb videos that display in the UI (QuickTime seems to sit on top of everything)
Because these are mostly UI changes I figured I don't want to do this in the controllers so this would be a good solution.
Thoughts?
Why not write your own service to wrap the modal factory and add this feature?
Because I honestly did not think of that, and it makes perfect sense...
Done, works great, thanks a lot! :D
Might write up a blog post for this.