Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requirejs loading not work #64

Open
molyland opened this issue Nov 6, 2017 · 1 comment
Open

requirejs loading not work #64

molyland opened this issue Nov 6, 2017 · 1 comment

Comments

@molyland
Copy link

molyland commented Nov 6, 2017

I added x2js on my bower.json file

"x2js": "~1.2.0"

Then add in my main.js requirejs config file

paths: {
'x2js': '../vendor/x2js/xml2json.min'
....
}

shim: {
   'x2js' : {
          exports : 'X2JS'
        },
....
   'admin-lte' : {
          deps: [
            'jquery', 
            'jquery.bootstrap', 
            'toastr', 
            'bootstrap-datepicker',
            'jquery.transform',
            'x2js'
          ]
        }
}

In my script

var x2js = new X2JS();
var json_obj = x2js.xml_str2json(xml_str);
console.log('module [json obj]: ', json_obj);

I've this error:

ReferenceError: X2JS is not defined

@varadekd
Copy link

any leads to this issue? I am facing the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants