Search code examples
javascriptangularjscordovacordova-pluginsyo

Yeoman angularjs-cordova app - what is next?


I created the app according to this article: https://www.npmjs.com/package/generator-angularjs-cordova with yeoman and angularjs-cordova generator.
At creation app time, I was prompted to choose plugins that I want to use in my app.
I added next cordova plugins:
cordova.device, cordova.camera and cordova.vibration.
I run the app in browser with "grunt serve" command and it works!
Now, how can I get the device data?
I tried to check the device global object in app\js\application.js but it's undefined...

EDIT:
In firebug console I get the next errors:
"NetworkError: 404 Not Found - http://127.0.0.1:9000/cordova.js"
"ReferenceError: jQuery is not defined"

Why those modules were not connected automatically?
Where do I need to place the connection to the modules?


Solution

  • The answer is simple!
    Device is not exists on the web browser.
    When I run it on the android smartphone - everything is OK.
    * Remember to copy all files from the app folder to the www folder!