Skip to content

Conversation

@alajmo
Copy link

@alajmo alajmo commented Jul 14, 2016

Hi,

I didn't find the possibility to group under one single constant name.

Example

Given an object like:

{
 "person": "samir",
 "age": 99
}

I wanted to get this:

angular.module("conf", [])
.constant("CONFIG", {
 "person": "samir",
 "age": 99
});

but instead got this:

angular.module("conf", [])
.constant("person", "samir")
.constant"age", 99);

Using an optional parameter we can simply group the whole object under a user defined constant.

Let me know if you think this feature makes sense and I'll write the tests and update README to include an example (I just added the option explanation for now).

@alajmo alajmo changed the title Adding option to group constants under one constant name. Adding option to group constants under one constant name. See issue issue #38. Jul 28, 2016
@alajmo alajmo changed the title Adding option to group constants under one constant name. See issue issue #38. Adding option to group constants under one constant name. See issue #38. Aug 16, 2016
@ViieeS
Copy link

ViieeS commented Nov 17, 2017

@guzart how about to merge it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants