Promise not defined in ionic.bundle.js:11731

I’m getting, on Android 4.2.2 (Asus nexus 7):

Uncaught ReferenceError: Promise is not defined at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:11731

ionic.bundle.js: version: ‘1.0.0-beta.11’

Please LMK what other info I should provide.

I’m also new to Promises. I’m trying to do something like this in my utility.js:

'use strict';

angular.module('boosterapp.utility', [])

.service('Utility', function($ionicPopup, $q, Promise, $rootScope, $state, Booster) {

var self = this;    
this.asyncLoginRegister = new Promise(function(resolve, reject)
    var d = $q.defer();
    return self.asychGetLoginStatus()
        return self.asynchFacebookLogin()

More context code:

Thanks for your help!

1 Like

In ionic.bundle.js at line 11731, in function createInternalInjector, there is “throw err”:

I see all references to Promise in ionic.bundle as lower-case, so:
I changed my client code from using “new Promise” to “new promise”

And now I get this:

09-09 11:14:09.796: E/Web Console(4270): Uncaught Error: [$injector:unpr] Unknown provider: PromiseProvider <- Promise <- Utility
09-09 11:14:09.796: E/Web Console(4270):$injector/unpr?p0=PromiseProvider%20<-%20Promise%20<-%20Utility at file:///android_asset/www/lib/ionic/js/ionic.bundle.js:11731