79472175

Date: 2025-02-27 09:30:32
Score: 1
Natty:
Report link

Since Angular 19.2.0, you can now use string template literals in your HTML file:

<!-- app-root.component.html -->
<div [class]="`category-${category}`">
  {{ `My name is ${name}!` }}
</div>
// app-root.component.ts
@Component({
  selector: 'app-root',
  templateUrl: 'app-root.component.html',
})
export class PlaygroundComponent {
  name = 'John';
  category = 'abc';
}

Stackblitz

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: fservantdev