Skip to content

Commit b38e7e4

Browse files
committed
refactor: use standalone api
1 parent 780a293 commit b38e7e4

File tree

7 files changed

+6
-33
lines changed

7 files changed

+6
-33
lines changed

src/app/app-routing.module.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/app/app.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,3 @@ <h2>
3131
</h2>
3232
</li>
3333
</ul>
34-
35-
<router-outlet></router-outlet>

src/app/app.component.scss

Whitespace-only changes.

src/app/app.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component } from '@angular/core';
33
@Component({
44
selector: 'app-root',
55
templateUrl: './app.component.html',
6-
styleUrls: ['./app.component.scss'],
6+
standalone: true,
77
})
88
export class AppComponent {
99
title = 'VSCode Webview Angular';

src/app/app.module.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8" />
5-
<title>AngularWebviewVscode</title>
5+
<title>Angular Webview Vscode Template</title>
66
<base href="/" />
77

88
<meta name="viewport" content="width=device-width, initial-scale=1" />
99
<link rel="icon" type="image/x-icon" href="favicon.ico" />
1010
</head>
1111
<body>
12-
<app-root></app-root>
12+
<app-root />
1313
</body>
1414
</html>

src/main.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { enableProdMode } from '@angular/core';
2-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
32

4-
import { AppModule } from './app/app.module';
3+
import { bootstrapApplication } from '@angular/platform-browser';
4+
import { AppComponent } from './app/app.component';
55
import { environment } from './environments/environment';
66

77
if (environment.production) {
88
enableProdMode();
99
}
1010

11-
platformBrowserDynamic()
12-
.bootstrapModule(AppModule)
13-
.catch((err) => console.error(err));
11+
bootstrapApplication(AppComponent).catch((err) => console.error(err));

0 commit comments

Comments
 (0)