Access window object in ember-cli

Hi, I am trying to use torii in a cordova application. My environment.js file is as follows. I cannot access the window document object to configure redirectUri. getting undefined error. how can i access the windows document object.
module.exports = function (environment) {
    var ENV = {
        environment: environment,
        baseURL: '/',
        locationType: 'hash',
        EmberENV: {
            FEATURES: {
                // Here you can enable experimental features on an ember canary build
                // e.g. 'with-controller': true
            }
        },
        APP: {
            // Here you can pass flags/options to your application instance
            // when it is created
        },
        torii: {
            providers: {
                'facebook-oauth2': {
                    apiKey: '2xxxxxxxxxx',
                    redirectUri: document.location.href
                },
            }
        },
        cordova: {
            rebuildOnChange: false,
            rebuildAsync: false,
            emulate: false
        }
    };

in my .jshintrc

"predef": {
    "document": true,
    "window": true,
    "AuthENV": true
  }

therefore, I assume that the document should be accessible worldwide, but it is not

+4
source share
1 answer

You can get access to objects windowand documentthrough a large part of your code Ember.js as global variables.

. , Node.js - , .

, config - :

<meta name="[your-app]/config/environment" content="your-config-here" />

URL- , " " OAuth.

+1

All Articles