Created
November 4, 2014 05:55
-
-
Save lakshmig/94c17b7cd9478fada80f to your computer and use it in GitHub Desktop.
Angular Device Ready for Ionic with Cordova
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy below code at the begining of app.js | |
var ngDocument = angular.element(document); | |
angular.element(ngDocument).ready(function() { | |
alert() | |
ngDocument.on('deviceready', function() { | |
alert("inside device ready"); | |
var body = ngDocument.find('body'); | |
angular.bootstrap(body, ['starter']); | |
}); | |
}); | |
angular.module('starter', ['ionic' ,'starter.controllers', 'starter.services','ngCordova']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment