ionic modal 动画无效


有的人说需要引入css,我也引用了,结果还是不行,求助于各位

js


 $ionicModal.fromTemplateUrl('tpl/detail.html', {
        scope: $scope,
        animation:'slide-in-up'
    }).then(function(modal) {
        $scope.modal = modal;
    });
    $scope.openModal = function(id) {
        $scope.detail=$scope.data.list[id];
        $ionicScrollDelegate.$getByHandle('detail').scrollTop();
        $scope.modal.show();
    };
    $scope.closeModal = function() {
        $scope.modal.hide({animation:'slide-in-left'});
    };
    //Cleanup the modal when we're done with it!
    $scope.$on('$destroy', function() {
        $scope.modal.remove();
    });
    // Execute action on hide modal
    $scope.$on('modal.hidden', function() {
        // Execute action
    });
    // Execute action on remove modal
    $scope.$on('modal.removed', function() {
        // Execute action
    });

css


 @-webkit-keyframes slideInUp {
  0% {
    -webkit-transform: translate3d(100%, 0%, 0);
    -moz-transform: translate3d(100%, 0%, 0);
    transform: translate3d(100%, 0%, 0);
    opacity: 1; }

  100% {
    -webkit-transform: translate3d(0, 0, 0);
    -moz-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    opacity: 1; } }

ionic ionicframework JavaScript angularjs

hander 10 years, 3 months ago

Your Answer