Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ngAttr for boolean attributes #2111

Closed
Closed
@lanterndev

Description

@lanterndev

I came across #698 again and wonder if the new ngAttr support could help with autofocus if it had special behavior for boolean values. Perhaps something like:

<input type="text" ng-attr-autofocus="{{ value }}">

could cause the autofocus attribute to be added (with a value of value) when value is truthy, and would cause the attribute to be removed when value is falsey (rather than giving it a value of "false").

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