javascript - Compile Angular2 in Cordova with Cordova Plugins -
i have cordova app, angular 2 app inside it, compiling www folder.
structure
cordova - hooks - plugins - ng (angular app) - src - angular-cli.json - www - platforms etc ...
in angular-cli.json have
"scripts": ["../../platforms/ios/www/cordova.js","../../platforms/ios/www/cordova_plugins.js", "../../plugins/cordova-plugin-geolocation/www/geolocation.js", "../../plugins/cordova-plugin-geolocation/www/coordinates.js", "../../plugins/cordova-plugin-geolocation/www/position.js", "../../plugins/cordova-plugin-geolocation/www/positionerror.js"],
which kind of seems bundle stuff in, hard tell. while in chrome log
could not find cordova.js script tag. plugin loading may fail.
zone.js:196 uncaught error: module cordova-plugin-geolocation.coordinates not exist.
and slew of
get errors 'http://localhost:4200/plugins/cordova-plugin-geolocation/www/coordinates.js' , others.
it seems bit tacky, , i'm not sure yet how can access navigator object yet .ts files plugins.
has managed solve in nice way?
Comments
Post a Comment