ngx-translate / core

The internationalization (i18n) library for Angular
MIT License
4.53k stars 578 forks source link

ExpressionChangedAfterItHasBeenCheckedError when using translate pipe on mat-option #1395

Open Christoph142 opened 1 year ago

Christoph142 commented 1 year ago

Current behavior

ERROR Error: NG0100: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: ''. Current value: '1'.. Find more at https://angular.io/errors/NG0100 in console

Expected behavior

No error

Minimal reproduction of the problem with instructions

Just insert `

{{ "HOME.1" | translate }}
      <mat-option value="2">{{ "HOME.2" | translate }}</mat-option>
      <mat-option value="3">{{ "HOME.3" | translate }}</mat-option>
    </mat-select>`

in any template

Environment


ngx-translate version: "@ngx-translate/core": "^14.0.0", "@ngx-translate/http-loader": "^7.0.0",
Angular version: 13

Browser:
- [x] Chrome (desktop) version 108
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Others:
Others encountered this, too: https://stackoverflow.com/questions/68651907/translated-value-inside-mat-option-causes-expressionchangedafterithasbeenchecked
walide67 commented 1 year ago

the same problem with me

Lempkin commented 11 months ago

Same here :/