Skip to content

data- prefix gets stripped from bindings such as <div data-id="{{1}}"> #26406

@splincode

Description

@splincode

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[x] Other... Please describe: embarrassment

Current behavior

<button [attr.data-id]="'btn-' + type">action 1</button>

<button data-id="btn-{{type}}">action 2</button>

image

Expected behavior

There must be the same behavior

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-w2nsvr?file=src/app/app.component.html

Environment


Angular version: 6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions