Ionic-javascript:ionic Pull-up menu (Actionsheet)

Source: Internet
Author: User

Ylbtech-ionic-javascript:ionic Pull-up menu (Actionsheet)

1. back to top
1. Ionic Pull-up menu (Actionsheet)

The Pull-up menu (Actionsheet) lets the user select an option by going up the box that pops up.

Very dangerous options are highlighted in red to let people recognize the first time. You can make it disappear by clicking on the Cancel button or by clicking on the blank area.

Instance HTML code
<body Ng-app="starter" ng-controller="Actionsheetctl" > < ion-pane> <ion-content >  ng-click="show ()"  >Action Sheet </ion-content> </ion-pane></body >                  
JavaScript Code

Triggering the pull-down menu in your code requires the $ionicActionSheet service to be used in your angular controller:

Angular.Module(' Starter ', [' Ionic ']).Run(function($ionicPlatform) {$ionicPlatform.Ready(function() { Hide the Accessory Bar by default (remove this to show the accessory bar above the keyboard for form inputs) If(Window.Cordova&&Window.Cordova.Plugins.Keyboard) {Cordova.Plugins.Keyboard.Hidekeyboardaccessorybar(True); } If(Window.StatusBar) { StatusBar.Styledefault(); } });}).Controller( ' Actionsheetctl ',[' $scope ',' $ionicActionSheet ',' $timeout ' ,function($scope,$ionicActionSheet,$timeout){$scope.Show= function() { VarHidesheet=$ionicActionSheet.Show({Buttons: [ {Text: ' <b>Share</b> this ' }, {Text: ' Move ' } ],Destructivetext: ' Delete ',TitleText: ' Modify your album ',Canceltext: ' Cancel ',Cancel: function() { Add Cancel Code: }, Buttonclicked: function  (index)  {return true; } });  $timeout  (function ()  Span class= "pun" >{ Hidesheet (); }, 2000); };  }])            /span>                

Try it?

Operating effects such as:

2.
2. back to top
3. back to top
4. back to top
5. back to top
1, HTTP://WWW.RUNOOB.COM/IONIC/IONIC-ACTIONSHEET.HTML2,
6. back to top
Ylbtech
Source: http://ylbtech.cnblogs.com/
This article is copyright to the author and the blog Park, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original link, otherwise reserves the right to pursue legal responsibility.

Ionic-javascript:ionic Pull-up menu (Actionsheet)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.