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
30 lines
620 B
TypeScript
30 lines
620 B
TypeScript
import { Component } from '@angular/core';
|
|
import { NgFor } from '@angular/common';
|
|
|
|
import { CUSTOMERS } from './customers';
|
|
|
|
@Component({
|
|
standalone: true,
|
|
selector: 'app-root',
|
|
templateUrl: './app.component.html',
|
|
imports: [ NgFor ],
|
|
styleUrls: ['./app.component.css']
|
|
})
|
|
export class AppComponent {
|
|
customers = CUSTOMERS;
|
|
// #docregion customer
|
|
currentCustomer = 'Maria';
|
|
// #enddocregion customer
|
|
|
|
title = 'Featured product:';
|
|
itemImageUrl = '../assets/potted-plant.svg';
|
|
|
|
recommended = 'You might also like:';
|
|
itemImageUrl2 = '../assets/lamp.svg';
|
|
|
|
|
|
|
|
getVal(): number { return 2; }
|
|
|
|
|
|
}
|