mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This integration app also contains the size-tracking build setup to measure the payload size of `@defer` feature. PR Close #52065
25 lines
432 B
TypeScript
25 lines
432 B
TypeScript
import {Component} from '@angular/core';
|
|
|
|
import {DeferComponent} from './defer.component';
|
|
|
|
@Component({
|
|
standalone: true,
|
|
selector: 'app-root',
|
|
imports: [DeferComponent],
|
|
template: `
|
|
<h1>Defer feature</h1>
|
|
|
|
@defer (when isVisible) {
|
|
<defer-cmp />
|
|
} @loading {
|
|
loading
|
|
} @placeholder {
|
|
Placeholder
|
|
} @error {
|
|
Error
|
|
}
|
|
`,
|
|
})
|
|
export class AppComponent {
|
|
isVisible = true;
|
|
}
|