angular-number-picker icon indicating copy to clipboard operation
angular-number-picker copied to clipboard

checking if reuire is defined

Open eladkarakuli opened this issue 9 years ago • 1 comments

Hey, I'm trying to use the component in a meteor + angular env. I've exports to be the 'window', don't really know why. Then I'm getting "ReferenceError: require is not defined", I've added a check, to prevent this error.

eladkarakuli avatar Nov 27 '15 13:11 eladkarakuli

I am not familiar with meteor. But the code style i am using is UMD, by which the module can be used in CommonJs, AMD, global definition flavor.

To use "require" key word, means you'd like to write your app in CommonJs flavor, you need using "browserify" or "webpack" to bundle your source code. Do not define "exports" yourself.

leftstick avatar Nov 27 '15 14:11 leftstick