-1

When I adding 'ngCordova' to app.js I am getting a white page. code:

angular.module('app', ['ionic', 'ngCordova','app.controllers', 'app.routes', 'app.directives','app.services'])

I included the cordova.js in index.html:

<script src="cordova.js"></script>

What i need to do?

Ron
  • 309
  • 2
  • 6
  • 20

1 Answers1

0

In console, have you an error or a warning?

Check your path to be correct. Where have you installed cordova?

An example:

In my case i have:

 <script src="lib/ng-cordova-0.1.17-alpha/dist/ng-cordova.js"></script>

I give the full path.

Do you give the correct path?

You can use the following steps:

$ bower install ngCordova 

Include ng-cordova.js or ng-cordova.min.js in your index.html file before cordova.js and after your AngularJS / Ionic file (since ngCordova depends on AngularJS).

<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="cordova.js"></script>

Then, include ngCordova as a dependency in your angular module:

angular.module('myApp', ['ngCordova'])
e7lT2P
  • 1,147
  • 2
  • 15
  • 35