2015-12-02 03:33:08 +08:00
var ng1 _1 = require ( './ng1' ) ;
ng1 _1 . initAngular1 ( ) ;
2015-11-30 06:30:15 +08:00
var DEVICE _READY _TIMEOUT = 2000 ;
2015-12-02 08:47:24 +08:00
var actionsheet _1 = require ( './plugins/actionsheet' ) ;
exports . ActionSheet = actionsheet _1 . ActionSheet ;
var ble _1 = require ( './plugins/ble' ) ;
exports . BLE = ble _1 . BLE ;
var camera _1 = require ( './plugins/camera' ) ;
exports . Camera = camera _1 . Camera ;
var calendar _1 = require ( './plugins/calendar' ) ;
exports . Calendar = calendar _1 . Calendar ;
var contacts _1 = require ( './plugins/contacts' ) ;
exports . Contacts = contacts _1 . Contacts ;
var device _1 = require ( './plugins/device' ) ;
exports . Device = device _1 . Device ;
var facebook _1 = require ( './plugins/facebook' ) ;
exports . Facebook = facebook _1 . Facebook ;
var geolocation _1 = require ( './plugins/geolocation' ) ;
exports . Geolocation = geolocation _1 . Geolocation ;
var push _1 = require ( './plugins/push' ) ;
exports . Push = push _1 . Push ;
var statusbar _1 = require ( './plugins/statusbar' ) ;
exports . StatusBar = statusbar _1 . StatusBar ;
var toast _1 = require ( './plugins/toast' ) ;
exports . Toast = toast _1 . Toast ;
2015-12-02 03:33:08 +08:00
// Window export to use outside of a module loading system
window [ 'IonicNative' ] = {
2015-12-02 08:47:24 +08:00
ActionSheet : actionsheet _1 . ActionSheet ,
BLE : ble _1 . BLE ,
Camera : camera _1 . Camera ,
Calendar : calendar _1 . Calendar ,
Contacts : contacts _1 . Contacts ,
Device : device _1 . Device ,
Facebook : facebook _1 . Facebook ,
Geolocation : geolocation _1 . Geolocation ,
Push : push _1 . Push ,
StatusBar : statusbar _1 . StatusBar ,
Toast : toast _1 . Toast
2015-12-02 03:33:08 +08:00
} ;
// To help developers using cordova, we listen for the device ready event and
// log an error if it didn't fire in a reasonable amount of time. Generally,
// when this happens, developers should remove and reinstall plugins, since
// an inconsistent plugin is often the culprit.
2015-12-01 03:27:25 +08:00
var before = + new Date ;
2015-11-30 06:30:15 +08:00
var didFireReady = false ;
2015-12-01 03:27:25 +08:00
document . addEventListener ( 'deviceready' , function ( ) {
console . log ( 'DEVICE READY FIRED AFTER' , ( + new Date - before ) , 'ms' ) ;
2015-11-30 06:30:15 +08:00
didFireReady = true ;
} ) ;
setTimeout ( function ( ) {
2015-11-30 07:20:11 +08:00
if ( ! didFireReady && window . cordova ) {
2015-11-30 06:30:15 +08:00
console . warn ( 'Native: deviceready did not fire within ' + DEVICE _READY _TIMEOUT + 'ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.' ) ;
}
} , DEVICE _READY _TIMEOUT ) ;
2015-12-01 02:34:54 +08:00
//# sourceMappingURL=index.js.map