How do I open a modal inside a modal with a suitable background with angular framework?
I would like to open a modal inside a modal background with a background - backdrop -> window -> backdrop -> window
How can I achieve this using angular framework?
http://madmimi.github.io/angular-foundation/
thank!
+3
source to share
2 answers
angular-foundation does not support modality inside another modal. The z-index values ββare hardcoded.
There is a solution that replaces the modal, but that doesn't work for us. http://foundation.zurb.com/docs/components/reveal.html
I have applied the directive for this (typescript) -
export function ModalPositionHelper($modalStack):ng.IDirective {
var initialModalZIndex = 1005;
return {
restrict: 'A',
link: function (scope) {
scope.$watch(function () {
return $modalStack.getTop();
}, function (newModal, oldModal) {
if (oldModal) {
oldModal.value.modalDomEl.css('z-index', initialModalZIndex);
}
if (newModal) {
newModal.value.modalDomEl.css('z-index', initialModalZIndex + 2);
angular.element('.reveal-modal-bg').css('z-index', initialModalZIndex + 1);
}
});
}
};
}
Basically I look at $ modalStack.getTop () and change its z-index.
+1
source to share