Open mcblum opened 8 years ago
I'm having the same issue, did you manage to fix it ?
@ArthurianX try:
import ngStorage from 'ngstorage';
angular.module('app', [ ngStorage.name ]);
Can this method be added to the docs?
@poloagustin did it work for you?
@mcblum yes! 👍
Although, it'd be nice to be able to just do angular.module('app', ['ngstorage']);
Sorry, i meant angular.module('app', [require('ngstorage')]);
@poloagustin I need you to know I'm not the best at this and it's my first time using Webpack / ES6 so I'm probably not the right person to speak authoritatively on it.
I'll try to make a PR when I have time then 😊
This is a workaround:
const angular = require('angular');
const ngStorage = (() => 'ngStorage')(require('ngstorage'));
angular.module('app', [ngStorage]);
I guess angular 1 isn't really relevant anymore but can something be done about this? At least put @AldoMX 's workaround in the readme.
@PerfectionCSGO move to Angular 5 :) I resisted for 100 years and our project was "too big to migrate". We ended up doing it anyway and I was kicking myself for not doing it sooner.
I'm getting a strange error. It also could be because I'm a bit new to ES6 + true modules.
Argument 'module' is not a function, got Object
Does this package work out of the box with Webpack or do I need to do something different?