Bootstrap 4的Angular UI模态 [英] Angular UI modal with Bootstrap 4
问题描述
Bootstrap 3模态工作正常: https://jsfiddle.net/qLy7gk3f/4/
Bootstrap 3 modal works fine: https://jsfiddle.net/qLy7gk3f/4/
但是Bootstrap 4模式不会: https://jsfiddle.net/qLy7gk3f/3/
But Bootstrap 4 modal doesn't: https://jsfiddle.net/qLy7gk3f/3/
代码相同:
$scope.click = function() {
$uibModal.open({
templateUrl: "modal.html",
controller: "modal",
scope: $scope
});
}
如何使AngularUI模式与Bootstrap 4配合使用?
How can I get AngularUI modals to work with Bootstrap 4?
推荐答案
我认为这只是添加.in
类的一种情况,特别是:
I think it's just a case of adding the .in
classes, specifically:
.fade.in {
opacity: 1;
}
.modal.in .modal-dialog {
-webkit-transform: translate(0, 0);
-o-transform: translate(0, 0);
transform: translate(0, 0);
}
.modal-backdrop.in {
filter: alpha(opacity=50);
opacity: .5;
}
更新的小提琴: https://jsfiddle.net/qLy7gk3f/5/
或者您可以修改Bootstrap 4以使用show
类:
https://github.com/angular-ui/bootstrap/issues/4234 #issuecomment-285303515
Or you could modify Bootstrap 4 to use the show
class:
https://github.com/angular-ui/bootstrap/issues/4234#issuecomment-285303515
这篇关于Bootstrap 4的Angular UI模态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!