Skip to content

Variable with filter in class attribute removes class attribute #195

Closed
@destroytoday

Description

@destroytoday

With the following code, I would expect Vue to inject the type as a string, just like it does when just using {{ type }}. However, when including a filter, Vue will remove the class attribute altogether.

<li class='{{ type | itemTypeToString }} my-class'>My Item</li>

Also, if you have the variable before the existing classes, like above, Vue will throw Unknown filter: itemTypeToString). But, if you place the variable after the existing classes, it will throw Error parsing expression: "item "+(type

Any ideas? I just pulled down the latest release and it still happens.

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