mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Supplements PR 51364 Template Migration with overlooked pages and examples Code migrated: `inputs-outputs`, `interpolation`, `property-binding` Guide pages affected: * `binding-overview.md` * `event-binding.md` (already migrated; updated with link to explain passive events) * `inputs-outputs.md` * `interpolation.md` * `property-binding-best-practices.md` * `property-binding.md` * `understanding-template-expr-overview.md` (archived) E2E tests passed locally. PR Close #51632
23 lines
544 B
TypeScript
23 lines
544 B
TypeScript
import { Component } from '@angular/core';
|
|
import { NgFor } from '@angular/common';
|
|
|
|
// #docregion var-collision
|
|
@Component({
|
|
standalone: true,
|
|
template: `
|
|
<div>
|
|
<!-- Hello, Padma -->
|
|
<h1>Hello, {{customer}}</h1>
|
|
<ul>
|
|
<!-- Ebony and Chiho in a list-->
|
|
<li *ngFor="let customer of customers">{{ customer.value }}</li>
|
|
</ul>
|
|
</div>
|
|
`,
|
|
imports: [NgFor]
|
|
})
|
|
export class AppComponent {
|
|
customers = [{value: 'Ebony'}, {value: 'Chiho'}];
|
|
customer = 'Padma';
|
|
}
|
|
// #enddocregion var-collision
|