Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to group constants under one constant name. See issue #38. #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants