背景 -> ウィンドウ -> 背景 -> ウィンドウのような背景を持つモーダル内にモーダルを開きたい
角度のある基盤でそれをどのように達成できますか?
http://madmimi.github.io/angular-foundation/
ありがとう!
背景 -> ウィンドウ -> 背景 -> ウィンドウのような背景を持つモーダル内にモーダルを開きたい
角度のある基盤でそれをどのように達成できますか?
http://madmimi.github.io/angular-foundation/
ありがとう!
angular-foundation は、別のモーダル内のモーダルをサポートしていません。z-index 値はハードコーディングされています。
モーダルに代わるソリューションがありますが、それは私たちには合いませんでした。 http://foundation.zurb.com/docs/components/reveal.html
それを行うためのディレクティブを実装しました(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);
}
});
}
};
}
基本的に、私は $modalStack.getTop() を監視し、z-index を変更します。
これがもたらす優れたユーザー エクスペリエンスはありません。アプローチを再考することは、ダブルモーダルよりも優れています。一部の修正は、コードに関連していません。