Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

wyntau/angular-ios-actionsheet

Repository files navigation

angular-ios-actionsheet

iOS7+ style actionsheet service for angular

Install

bower install angular-ios-actionsheet

Usage

  1. include angular-ios-actionsheet.js and angular-ios-actionsheet.css in you html
  2. include angular-ios-actionsheet in you angular dependencies
  3. inject iosActionSheet in you angular app

Option

Array.<buttonObject | Array.<buttonObject>>

buttonObject keys:

  • text, string

  • color, boolean

  • bold, boolean

  • disable, boolean

  • label, boolean

  • onClick, function, a data object which contains index, parentIndex and button will be passed in

    an example of buttonObject

    {
        text: 'button',
        color: true,
        bold: true,
        disable: false,
        label: false,
        onClick: function(data){
            // data.index
            // data.parentIndex
            // data.button
        }
    }

when label or disable is true, the button can't be clicked

License

MIT