Allow custom attributes with dot (some-name.some-suffix) interpolation
See original GitHub issue🐞 bug report
Affected Package
Any version i guess
Is this a regression?
No
Description
Allow to handle complicated custom attributes by html parser
🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-playground-zhx28b
Take a look on hello-framework.component.html
<button data-ts.label="abc">action 1</button>
<button data-ts.label="{{name}}">action 2</button>
<button [attr.data-ts.label]="name">action 3</button>
EXPECTED all three button should have data-ts.label="some-title"
🔥 Exception or Error
For case with <button data-ts.label="{{name}}">action 2</button>
it throws
Error in /turbo_modules/@angular/compiler@7.2.4/bundles/compiler.umd.js (2496:21)
Template parse errors:
Can't bind to 'ts.label' since it isn't a known property of 'button'. ("
<button data-ts.label="some-title">action 1</button>
<button [ERROR ->]data-ts.label="{{title}}">action 2</button>
<button [attr.data-ts.label]="title">action 3</button>"): ng:///HelloFrameworkModule/HelloFrameworkComponent.html@5:8
Third example with <button [attr.data-ts.label]="name">action 3</button>
cuts .label
suffix
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Add custom attribute to a dot SVG edge using jQuery
So far, I have only found a way to add a custom identifier. Is there any way to add also a custom class?...
Read more >Custom Attributes - YouTube
Something missing from .NET? You can add it yourself with custom attributes.Source code available at: ...
Read more >How You Can Use HTML5 Custom Data Attributes and Why
Gajendar Singh walks you through HTML5 custom data attributes, why they're useful, how to style them with CSS and manipulate them with ...
Read more >Built-in and Custom Data Attributes - Beginner JavaScript
All attributes on an element are done via getters and setters. You can use the dot notation to access them. You may have...
Read more >Collect custom attributes - New Relic Documentation
Using reserved terms can cause issues. To enable and use custom attributes for APM, follow the procedure for your APM agent: C SDK....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Everything is fine now, thank you for closing this, @jessicajaniuk !
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.