Angst UI模式与Bootstrap 4

Sea*_*ean 11 twitter-bootstrap angularjs angular-ui twitter-bootstrap-4

Bootstrap 3模式工作正常:https: //jsfiddle.net/qLy7gk3f/4/

但Bootstrap 4模式不会:https: //jsfiddle.net/qLy7gk3f/3/

代码完全相同:

$scope.click = function() {
  $uibModal.open({
    templateUrl: "modal.html",
    controller: "modal",
    scope: $scope
  });
}
Run Code Online (Sandbox Code Playgroud)

如何让AngularUI模态与Bootstrap 4一起使用?

Sea*_*ean 33

我认为这只是添加.in类的一种情况,具体来说:

.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;
}
Run Code Online (Sandbox Code Playgroud)

更新小提琴:https: //jsfiddle.net/qLy7gk3f/5/

或者您可以修改Bootstrap 4以使用show该类:https: //github.com/angular-ui/bootstrap/issues/4234#issuecomment-285303515