Skip to content

Properties with dashes in their names #130

@Mad-Chemist

Description

@Mad-Chemist

Hello. I was attempting to implement Epoxy earlier and had an error thrown once I had configured everything properly. The error seems avoidable if you do not use the with operator within the bindElementToView function.

I outlined the issue a bit in this stack overflow post.

Essentially what occurs is that my model has a property, lets say background-color, which cannot exist as a variable within JavaScript. When the parent object is passed into the with operator, it attempts to make background-color a block level local variable.

The following error gets thrown after attempting this above:

Uncaught Error parsing bindings: "value:background-color"
>> ReferenceError: background is not defined

Could the plugin accomplish this iteration manually or through some other means in order to avoid this issue cropping up?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions