mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
Action sheet working
This commit is contained in:
26
js/ext/angular/src/directive/ionicActionSheet.js
vendored
Normal file
26
js/ext/angular/src/directive/ionicActionSheet.js
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
angular.module('ionic.ui.actionSheet', [])
|
||||
|
||||
.directive('actionSheet', function() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
scope: true,
|
||||
replace: true,
|
||||
link: function($scope, $element){
|
||||
$scope.$on('$destroy', function() {
|
||||
$element.remove();
|
||||
});
|
||||
},
|
||||
template: '<div class="action-sheet">' +
|
||||
'<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>' +
|
||||
'</div>' +
|
||||
'<div class="action-sheet-group" ng-if="destructiveText">' +
|
||||
'<button class="button destructive" ng-click="destructiveButtonClicked()">{{destructiveText}}</button>' +
|
||||
'</div>' +
|
||||
'<div class="action-sheet-group" ng-if="cancelText">' +
|
||||
'<button class="button" ng-click="cancel()">{{cancelText}}</button>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
}
|
||||
});
|
||||
2
js/ext/angular/src/directive/ionicContent.js
vendored
2
js/ext/angular/src/directive/ionicContent.js
vendored
@ -1,4 +1,4 @@
|
||||
angular.module('ionic.ui.content', {})
|
||||
angular.module('ionic.ui.content', [])
|
||||
|
||||
// The content directive is a core scrollable content area
|
||||
// that is part of many View hierarchies
|
||||
|
||||
Reference in New Issue
Block a user