0.0.1 • Published 8 years ago
phonegap-plugin-sidebar v0.0.1
Native UI component for PhoneGap apps that want a side navigation menu.
To run tests (iOS only for now) you'll need cordova-paramedic installed
> npm install cordova-paramedic
> cordova-paramedic --platform ios
To install in your project
> cordova plugin add https://github.com/purplecabbage/phonegap-plugin-sidebar
> // again, that was iOS only ...
API
pgsidebar.show(cbSuccess,cbError,items)
cbSuccess:
callback to be called when the sidebar control is showncbError:
callback to be called if there was an error showing the sidebar controlitems:
an array of strings to display as a list in the sidebar control, when the user selects an item, the index in this array will be returned to the callback functionpgsidebar.hide(cbSuccess,cbError)
cbSuccess:
callback to be called when the sidebar control is hiddencbError:
callback to be called if there was an error hiding the sidebar control
Demo
To run the demo app (iOS only for now)
Note: you only get the demo app if you download/clone/fork the repo from github. npm published versions do not include the demo app.
cd demo/
cordova plugin add cordova-plugin-statusbar
cordova plugin add --link ../
cordova platform add ios
cordova run ios
0.0.1
8 years ago