$ IonicPlatform used to detect the current platform, as well as covering the Android back button PhoneGap / Cordova in.
Hardware platform back button, you can use this method to bind to it.
When this event occurs, the trigger callback function.
Remove the back button event listener.
Monitor functions were originally bound.
registerBackButtonAction(callback, priority, [actionId])
Register Hardware back button action. When you click the button, only one action is taken, this method determines the action registered back button has the highest priority.
For example, if a pull-up menu is already displayed, the Back button should close the pop-up menu, instead of returning a page view or close an open model.
When you click the Back button is triggered, if the monitor has the highest priority.
Only the highest priority will be executed.
| actionId |
The id specified this action. Default: a random and unique id.
Return value: function, a function is triggered, it will write-off backButtonAction.
Equipment is ready, trigger a callback function.
| callback |
Returns: promise the object, the object is constructed are resolved successfully.