var constants = { | |
settings: { | |
setting1: "value1", | |
setting2: "value2", | |
setting3: "value3" | |
} | |
}; | |
// check if we are in a Node enviro | |
if( typeof module != 'undefined') { | |
module.exports = constants; | |
// check if we are in an Angular enviro | |
} else if( typeof angular != 'undefined') { | |
angular.module('myApp') | |
.constant('constants',constants); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
Feel free to suggest improvements!