ionic-team / ionic-team/ionic-framework

bug: ion-label does not render when binding innerHTML directly

Open
#31,433 0 comments 0 reactions 0 assignees View on GitHub
triage
Dominant language
TypeScript
Stars
52.7k
Forks
13.3k
Avg merge
1d 15h
Merged PRs (30d)
51

Description

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v9.x, v8.x

### Current Behavior

When binding innerHTML directly to ion-label it does not get rendered.

### Expected Behavior

When binding innerHTML directly to ion-label it should be rendered.

### Steps to Reproduce

### Code Reproduction URL

https://stackblitz.com/edit/mchyfkqo?file=src%2Fapp%2Fexample.component.ts,src%2Fapp%2Fexample.component.html

### Ionic Info

However, wrapping the same content inside a native element works correctly:



### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by running the StackBlitz reproduction and inspect src/app/example.component.ts and src/app/example.component.html, comparing direct [innerHTML] binding on ion-label with the nested span case. Done means the bound HTML renders when applied directly to ion-label without breaking the working wrapped example.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.