mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-06 22:29:44 +08:00
More action sheet styles and animations
This commit is contained in:
@ -21,7 +21,7 @@ angular.module('ionic.ui.actionSheet', [])
|
||||
});
|
||||
},
|
||||
template: '<div class="action-sheet-backdrop">' +
|
||||
'<div class="action-sheet slide-in-up">' +
|
||||
'<div class="action-sheet action-sheet-up">' +
|
||||
'<div class="action-sheet-group">' +
|
||||
'<div class="action-sheet-title" ng-if="titleText">{{titleText}}</div>' +
|
||||
'<button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons">{{button.text}}</button>' +
|
||||
|
||||
11
js/ext/angular/src/service/ionicActionSheet.js
vendored
11
js/ext/angular/src/service/ionicActionSheet.js
vendored
@ -1,7 +1,7 @@
|
||||
angular.module('ionic.service.actionSheet', ['ionic.service.templateLoad', 'ionic.ui.actionSheet', 'ngAnimate'])
|
||||
|
||||
.factory('ActionSheet', ['$rootScope', '$document', '$compile', '$animate', 'TemplateLoader',
|
||||
function($rootScope, $document, $compile, $animate, TemplateLoader) {
|
||||
.factory('ActionSheet', ['$rootScope', '$document', '$compile', '$animate', '$timeout', 'TemplateLoader',
|
||||
function($rootScope, $document, $compile, $animate, $timeout, TemplateLoader) {
|
||||
|
||||
return {
|
||||
/**
|
||||
@ -30,8 +30,11 @@ angular.module('ionic.service.actionSheet', ['ionic.service.templateLoad', 'ioni
|
||||
opts.cancel();
|
||||
}
|
||||
});
|
||||
$animate.removeClass(element, 'active', function() {
|
||||
scope.$destroy();
|
||||
|
||||
$timeout(function() {
|
||||
$animate.removeClass(element, 'active', function() {
|
||||
scope.$destroy();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<script src="../../../../dist/js/ionic.js"></script>
|
||||
<script src="../../../../dist/js/ionic-angular.js"></script>
|
||||
<script>
|
||||
angular.module('actionTest', ['ionic'])
|
||||
angular.module('actionTest', ['ionic', 'ngAnimate'])
|
||||
|
||||
.controller('ActionCtrl', function($scope, ActionSheet) {
|
||||
$scope.show = function() {
|
||||
|
||||
Reference in New Issue
Block a user