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

Use angular.merge instead of angular.extend? #6

Open
sibbl opened this issue Mar 17, 2017 · 1 comment
Open

Use angular.merge instead of angular.extend? #6

sibbl opened this issue Mar 17, 2017 · 1 comment

Comments

@sibbl
Copy link

sibbl commented Mar 17, 2017

Hi all,

I do have quite nested translation objects in different files, i.e.:

{ "generic": { "hello": "world" } }

and

{ "generic": { "foo": "bar" } }

In the current version, only "foo.bar" is available as angular.extend is used. It extends the translation object on the first level, so "generic" is replaced in this case.

Which drawbacks would angular.extend have? If it's backwards compatibility, one could fall back to angular.merge if angular.extend is not available.

@cyrilchapon
Copy link

Hey.

As a workaround you could try a flat json file maybe ?

{
  'a.b.c': 'example',
  'a.b.d': 'example2'
}

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

No branches or pull requests

2 participants