我正在使用angular-strap
当我在标记中创建模态时,动画的效果与预期的一样。这是一个例子:
<a href="" bs-modal="settings.deleteAccountModal" data-animation="am-fade-and-slide-top" data-template="js/donor/settings/confirm-modal.html" class="trashOut"></a>
但是当我尝试使用$ modalService创建相同的模态时,动画不起作用。这是我的js代码:
this.openModal = function() {
$modal({
animation: 'am-fade-and-slide-top',
backdropAnimation: 'am-fade',
scope: $scope,
title: "Are you sure?",
backdrop: 'static',
template: 'js/donor/settings/confirm-modal.html',
show: true
});
};
如何使用$ modalService配置动画?
答案 0 :(得分:1)
如https://github.com/mgcrea/angular-strap/issues/1101所示 ,你需要添加
set dateformat dmy
create table #reservations (ReservationID int, FriendID int, TableNumber int, ReservationDate varchar(30), ReservationStatus bit)
INSERT INTO #Reservations values (16, 58767732, 32, '21/04/2015 17:06:54', 'FALSE'),
(17, -1, 32, '21/04/2015 17:10:41', 'FALSE'),
(18, -1, 2, '21/04/2015 17:17:23', 'FALSE'),
(2, 58767732, 3, '04/04/2015 19:37:17', 'FALSE'),
(3, -1, 7, '04/04/2015 19:37:43', 'FALSE'),
(4, -1, 5, '04/04/2015 23:24:24', 'FALSE'),
(5, -1, 31, '05/04/2015 16:29:02', 'FALSE'),
(6, -1, 6, '05/04/2015 16:40:29', 'FALSE'),
(8, 58767732, 32, '09/04/2015 16:24:00', 'FALSE'),
(9, -1, 6, '09/04/2015 16:25:03', 'FALSE'),
(7, -1, 6, '05/04/2015 17:12:47', 'FALSE')
SELECT *
FROM #Reservations
WHERE cast(left(ReservationDate,10) as date) <= '24/04/2015' AND cast(left(ReservationDate,10) as date) >= '17/03/2015'
drop table #reservations
并同时注入ngAnimate。请参阅plnkr撰写的vmlf01。这是他的回答,非常感谢他。
<link rel="stylesheet" href="//rawgithub.com/mgcrea/angular-motion/master/dist/angular-motion.min.css">