Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.21 KB

README.md

File metadata and controls

53 lines (36 loc) · 1.21 KB

TechcipherApp

Mobile App using Cordova and AngularJS.

Uses following dependencies

Overview

'deviceready' is the key for bootstrapping cordova with angularjs

angular.module('fsCordova', [])
.service('CordovaService', ['$document', '$q',
  function ($document, $q) {

      var d = $q.defer(),
          resolved = false;

      var self = this;
      this.ready = d.promise;

      document.addEventListener('deviceready', function () {
          resolved = true;
          d.resolve(window.cordova);
      });

      // Check to make sure we didn't miss the 
      // event (just in case)
      setTimeout(function () {
          if (!resolved) {
              if (window.cordova) d.resolve(window.cordova);
          }
      }, 3000);
  }]);


var tcApp = angular.module('tcApp', ['fsCordova', 'ngRoute']);

Demo

for code walk through go to "Building Mobile App with Cordova, Bootstrap and AngularJS"