Skip to content

FrequentlyMissedDeadlines/angular-x2js-wrapper

Repository files navigation

angular-x2js-wrapper

Version build release Downloads (total) License: MIT

I made this repo because I had troubles with X2JS in a webpack/angularjs/Meteor based application. If you also face this kind of issues using angular-x2js (seems no more maintained):

ReferenceError: X2JS is not defined

The solution is to replace the dependency on angular-x2js by angular-x2js-wrapper in your package.json file.

And update Angular dependency injection accordingly:

angular.module('your_module_name', ['fmd.x2js'])

Actually angular-x2js works only if X2JS variable is defined directly in window.

On the other hand, angular-x2js-wrapper doesn't require you to manually handle external dependencies, it's working out of the box. Enjoy it! 🎉