Skip to content

Instantly share code, notes, and snippets.

@cullen-tsering
Last active August 29, 2015 14:03
Show Gist options
  • Save cullen-tsering/ab2d9b2dc04e6d201d40 to your computer and use it in GitHub Desktop.
Save cullen-tsering/ab2d9b2dc04e6d201d40 to your computer and use it in GitHub Desktop.
Using Angular Service to return constants
// @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