angularjs - How do I open modal inside a modal with proper backdrop with angular foundation? -
i open modal inside modal backdrop - backdrop -> window -> backdrop -> window
how can achieve angular foundation?
http://madmimi.github.io/angular-foundation/
thanks!
angular-foundation not support modal inside modal. z-index values hardcoded.
there solution replaces modal, not fit us. http://foundation.zurb.com/docs/components/reveal.html
i implemented directive (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 watch $modalstack.gettop() , change it's z-index.
Comments
Post a Comment