-
Notifications
You must be signed in to change notification settings - Fork 478
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels