Skip to content

Class binding - can't pass string of classes when mixing array with object definition #2682

Closed
@sqal

Description

@sqal

Vue.js version

1.0.21

Reproduction Link

http://www.webpackbin.com/4kszqXok-

Steps to reproduce

Try to bind multiple classes like this :class="['class-1 class-2', { 'class-3': true }]"

What is Expected?

Be be able to bind classes like I described above.

What is actually happening?

Getting console error:

Uncaught InvalidCharacterError: Failed to execute 'add' on 'DOMTokenList': The token provided ('color-green text-uppercase') contains HTML space characters, which are not valid in tokens

Is this bug or am i doing it right wrong?

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