Skip to content

Clarify "falsy" values #1250

Closed
Closed
@Justineo

Description

@Justineo

https://vuejs.org/v2/guide/syntax.html#Attributes

It also works for boolean attributes - the attribute will be removed if the condition evaluates to a falsy value

In fact, binding an attribute to 0 or NaN won't result in removing the attribute. It's not a normal case but the doc should be more precise on this IMO.

via vuejs/v2.cn.vuejs.org#586

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