-
-
Notifications
You must be signed in to change notification settings - Fork 5
npm amd version tries to load angular more than once #5
Comments
Related to #4. |
@robertbaker, regarding that code: 76 angularNumbro(angular, require('numbro'));
77 module.exports = 'angularNumbro'; Looks like you're relying on
|
I ripped the wrapper from angular-moment (think it was that). I'll add a require angular to mine. Not sure if that will cause angular to load, hope not. |
@robertbaker, please let me know if you find out anything else. |
@adjohnson916 I couldn't resolve this without modifying your wrapper. IMO it's safe to assume angular is loaded for directives. You can't use an angular directive without angular. You shouldn't run into any script order issues either. |
@robertbaker Probably right. I'll try to reproduce the issue when I can. It may be a bug with Angular - there seems to be a strong convention that node modules can be required multiple times without side effect. |
@robertbaker What version of angular are you using? I have an example with browersify that's working fine when I require angular 1.4.2 in my main file, despite that the current version of ng-click-select itself, which I also require from my main file, also calls require for angular. See https://adjohnson916.github.io/ng-click-select-node-test/ from https://github.com/adjohnson916/ng-click-select-node-test. Is your code available anywhere for review? |
Seems to be related to the dependency of npm angular and jspm uses github. |
Thanks for reporting back, @robertbaker. I don't use jspm, so that would explain it. |
Look how I did it here: https://github.com/robertbaker/angular-numbro/blob/master/angular-numbro.js
Getting a console message that says trying to load angular more than once and pinned it down to this.
The text was updated successfully, but these errors were encountered: