import { bootstrapApplication } from '@angular/platform-browser';
import { Component } from '@angular/core';
@Component({
selector: 'app-hello',
standalone: true,
template: `<p>Hello from a generated component!</p>`
})
class HelloComponent {}
@Component({
selector: 'app-root',
standalone: true,
imports: [HelloComponent],
template: `
<h1>Hello, World!</h1>
<app-hello></app-hello>
`
})
class App {}
bootstrapApplication(App);
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Angular First App: Hello Component</title>
</head>
<body>
<app-root></app-root>
</body>
</html>