W3Schools Tryit Editor

[フレーム]
Get your own Angular server
main.ts
index.html
import { bootstrapApplication } from '@angular/platform-browser';
import { Component } from '@angular/core';
@Component({
 selector: 'app-root',
 standalone: true,
 template: `
 <h3>Template statements and $event</h3>
 <button (click)="count = count + 1">Increment</button>
 <input placeholder="Type" (input)="text = $any($event.target).value" [value]="text" />
 <p>Count: {{ count }}</p>
 <p>Text: {{ text || '(empty)' }}</p>
 `
})
export class App {
 count = 0;
 text = '';
}
bootstrapApplication(App);
 
<!doctype html>
<html lang="en">
<head>
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1">
 <title>Angular Templates</title>
</head>
<body>
 <app-root></app-root>
</body>
</html>
 

AltStyle によって変換されたページ (->オリジナル) /