Skip to content

Bug(scope): Error: invalid syntax if the param value is like "{1234-5678}"Β #898

@ChristianSchwarz

Description

@ChristianSchwarz

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) are the source of the bug?

Don't know / other

Is this a regression?

No

Current behavior

en.json

{
 "key_with_param": "UUID: {{value}}"
}

translate('key_with_param',{ value: '{1234-5678}'}

throws Error: invalid syntax at line ....

Expected behavior

the value should be translated to string: "UUID: {1234-5678}"

Please provide a link to a minimal reproduction of the bug, if you won't provide a link the issue won't be handled.

https://codesandbox.io/p/sandbox/mystifying-dust-4tr65z?file=%2Fsrc%2Fapp%2Ftranspilers%2Ftranspilers.component.html%3A88%2C32

Please provide the environment you discovered this bug in

Transloco: latest
Angular: latest

Browser

all

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions