diff --git a/verify/angular/src/app/app.component.ts b/verify/angular/src/app/app.component.ts index 8f95ab14..dbd46117 100644 --- a/verify/angular/src/app/app.component.ts +++ b/verify/angular/src/app/app.component.ts @@ -3,24 +3,25 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ -import { AfterViewInit, Component } from '@angular/core'; -import { MonacoEditorLanguageClientWrapper } from 'monaco-editor-wrapper'; -import { jsonClientUserConfig } from 'monaco-languageclient-examples/json-client'; +import { AfterViewInit, Component } from "@angular/core"; +import { MonacoEditorLanguageClientWrapper } from "monaco-editor-wrapper"; +import { jsonClientUserConfig } from "monaco-languageclient-examples/json-client"; @Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] + selector: "app-root", + templateUrl: "./app.component.html", + styleUrls: ["./app.component.css"], + standalone: true, }) export class MonacoEditorComponent implements AfterViewInit { - title = 'angular-client'; + title = "angular-client"; initDone = false; async ngAfterViewInit(): Promise { const wrapper = new MonacoEditorLanguageClientWrapper(); - const htmlElement = document.getElementById('monaco-editor-root'); + const htmlElement = document.getElementById("monaco-editor-root"); try { - await wrapper.initAndStart(jsonClientUserConfig , htmlElement ); + await wrapper.initAndStart(jsonClientUserConfig, htmlElement); } catch (e) { console.error(e); } diff --git a/verify/angular/src/app/app.module.ts b/verify/angular/src/app/app.module.ts deleted file mode 100644 index 0887cca9..00000000 --- a/verify/angular/src/app/app.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* -------------------------------------------------------------------------------------------- - * Copyright (c) 2023 TypeFox and others. - * Licensed under the MIT License. See LICENSE in the package root for license information. - * ------------------------------------------------------------------------------------------ */ - -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { MonacoEditorComponent } from './app.component'; - -@NgModule({ - declarations: [ - MonacoEditorComponent - ], - imports: [ - BrowserModule - ], - providers: [], - bootstrap: [ - MonacoEditorComponent - ] -}) -export class AppModule { - -} diff --git a/verify/angular/src/main.ts b/verify/angular/src/main.ts index 0365cfd4..415acfff 100644 --- a/verify/angular/src/main.ts +++ b/verify/angular/src/main.ts @@ -3,10 +3,6 @@ * Licensed under the MIT License. See LICENSE in the package root for license information. * ------------------------------------------------------------------------------------------ */ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch((err: Error) => { - console.error(err); - }); +import { bootstrapApplication } from "@angular/platform-browser"; +import { MonacoEditorComponent } from "./app/app.component"; +bootstrapApplication(MonacoEditorComponent);