Closed jukkasi closed 8 years ago
I'm using Angular 1.3.20 which is now CommonJS compatible (since 1.3.14).
When I use browserify require('angular-cache') var angular is undefined in your module. This leads to error "angular.module is undefined"
Similar issue has been discussed here https://github.com/likeastore/ngDialog/pull/168 but please note that discussion started BEFORE Angular 1.3.14 and CommonJS changes.
Changing angular-cache.js
if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(require("angular"));
to
if(typeof exports === 'object' && typeof module === 'object') module.exports = require("angular");
fixes the issue.
Working example is probably https://github.com/likeastore/ngDialog/blob/master/js/ngDialog.js
Any ideas? Would be actually nice to use this library.
Otherwise I'm forced to fork and remove the UMD stuff
@jukkasi can you create a pull-request with this fix?
Can we get this into angular-cache?!
+1
Fixed by b491ed83
I'm using Angular 1.3.20 which is now CommonJS compatible (since 1.3.14).
When I use browserify require('angular-cache') var angular is undefined in your module. This leads to error "angular.module is undefined"
Similar issue has been discussed here https://github.com/likeastore/ngDialog/pull/168 but please note that discussion started BEFORE Angular 1.3.14 and CommonJS changes.
Changing angular-cache.js
to
fixes the issue.
Working example is probably https://github.com/likeastore/ngDialog/blob/master/js/ngDialog.js