Angularjs manual bootstrap + constant


#1

Hey guys,
I am having an issue where I am unable to retrieve a constant value when manually bootstrapping.

This is my situation:
I need cordova to load before my angular app is bootstrapped because I am using keychain to retrieve a secret key.

When I get my value from keychain I have this code:

function win(value) {
            angular.bootstrap(document, ['airborne']);
            var airborne = angular.module('airborne');
            airborne.constant("treasure",value);
        }

However in my controller when I try to inject the ‘treasure’ constant I get this error: Error: [$injector:unpr] Unknown provider: treasureProvider <- treasure

Has anybody else experienced this or know how to solve it?