Commit 158eebc9 authored by Leonid Evstigneev's avatar Leonid Evstigneev Committed by Valentin Hervieu

using with browserify (#436)

Angular doesn't seem to support CommonJS.
parent c39e7e76
......@@ -19,7 +19,11 @@
// only CommonJS-like environments that support module.exports,
// like Node.
// to support bundler like browserify
module.exports = factory(require('angular'));
var angularObj = require('angular');
if ((!angularObj || !angularObj.module) && typeof angular != 'undefined') {
angularObj = angular;
}
module.exports = factory(angularObj);
} else {
// Browser globals (root is window)
factory(root.angular);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment