diff --git a/angular-ui-switch.js b/angular-ui-switch.js index 9a6b591..8703dda 100644 --- a/angular-ui-switch.js +++ b/angular-ui-switch.js @@ -1,3 +1,10 @@ +/* commonjs package manager support (eg componentjs) */ +if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){ + module.exports = 'uiSwitch'; +} + +var angular = require('angular'); + angular.module('uiSwitch', []) .directive('switch', function(){