Skip to content

Group under one single constant name. #38

@alajmo

Description

@alajmo

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions