Skip to content
This repository was archived by the owner on Oct 16, 2019. It is now read-only.
This repository was archived by the owner on Oct 16, 2019. It is now read-only.

Requirejs example #33

@ashishtilara

Description

@ashishtilara

I am trying to use this example with Requirejs but doesn't seem to have any luck... It keeps on throwing

Failed to instantiate module auth0.auth0 due to:
ReferenceError: Auth0 is not defined

Is it possible to get an example using RequireJS, I also tried to use example of angular-lock but that also throws similar error about Auth0Lock is not defined.

Following is my require.config, not sure what I am doing wrong here...

require.config({
    "paths": {
      "jquery": "node_modules/" + "jquery/dist/jquery.min",
      "angular": "node_modules/" + "angular/angular.min",
      "ngRoute": "node_modules/" + "angular-route/angular-route.min",
      "lodash": "node_modules/" + "lodash/lodash",
      "bootstrap": "node_modules/" + "bootstrap/dist/js/bootstrap.min",
      "ui.bootstrap": "node_modules/" + "angular-ui-bootstrap/dist/ui-bootstrap-tpls",
      "auth0": "bower_components/" + "auth0.js/build/auth0",
    "auth0.auth0":"bower_components/" + "angular-auth0/dist/angular-auth0",
    "angular-jwt":"bower_components/" + "angular-jwt/dist/angular-jwt",

      "domReady": "node_modules/" + "requirejs-domReady/domReady",
      "SYS.Controllers": "js/controllers/" + "controllers",
      "SYS.Service.Auth": "js/services/" + "SYS.Service.Auth"
    },
    "shim": {
      "angular": {
        "exports": "angular"
      },
      "ngRoute": {
        "deps": ["angular"]
      },
      "bootstrap": {
        "deps": ["jquery"]
      },
      "ui.bootstrap": {
        "deps": ["angular", "bootstrap"]
      },
      "lodash": {
        "exports": "_"
      },
      "auth0": {
        "exports": "Auth0"
      },
      "auth0.auth0": {
        "deps": ["angular", "auth0"]
      },
      "angular-jwt": {
        "deps": ["angular"]
      }
    }
  });

I would appreciate any help regarding fixing this.

cheers
Ashish

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions