Last active
August 29, 2015 14:03
-
-
Save cullen-tsering/ab2d9b2dc04e6d201d40 to your computer and use it in GitHub Desktop.
Using Angular Service to return constants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @dankapusta on twitter sent me a link to | |
// http://stackoverflow.com/questions/13015523/angular-js-is-value-the-proper-way-to-set-app-wide-constant-and-how-to-retri | |
// so changing service to const to | |
//code omitted | |
.constant('Consts', | |
{ | |
const1: { | |
yes: 1, | |
no: 2, | |
maybe: 3, | |
}, | |
const2: { | |
started: 1, | |
in_progress: 2, | |
collecting_fee: 3, | |
invoicing: 4, | |
completed: 5 | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment