Skip to content

Commit

Permalink
fix(angular): update to standalone for new angular convention
Browse files Browse the repository at this point in the history
  • Loading branch information
ls-infra committed Oct 8, 2024
1 parent 9e9d9f8 commit 72140a6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 41 deletions.
19 changes: 10 additions & 9 deletions verify/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Check failure on line 6 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
import { MonacoEditorLanguageClientWrapper } from "monaco-editor-wrapper";

Check failure on line 7 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
import { jsonClientUserConfig } from "monaco-languageclient-examples/json-client";

Check failure on line 8 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote

@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
selector: "app-root",

Check failure on line 11 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
templateUrl: "./app.component.html",

Check failure on line 12 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
styleUrls: ["./app.component.css"],

Check failure on line 13 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
standalone: true,
})
export class MonacoEditorComponent implements AfterViewInit {
title = 'angular-client';
title = "angular-client";

Check failure on line 17 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
initDone = false;

async ngAfterViewInit(): Promise<void> {
const wrapper = new MonacoEditorLanguageClientWrapper();
const htmlElement = document.getElementById('monaco-editor-root');
const htmlElement = document.getElementById("monaco-editor-root");

Check failure on line 22 in verify/angular/src/app/app.component.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
try {
await wrapper.initAndStart(jsonClientUserConfig , htmlElement );
await wrapper.initAndStart(jsonClientUserConfig, htmlElement);
} catch (e) {
console.error(e);
}
Expand Down
25 changes: 0 additions & 25 deletions verify/angular/src/app/app.module.ts

This file was deleted.

10 changes: 3 additions & 7 deletions verify/angular/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Check failure on line 6 in verify/angular/src/main.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
import { MonacoEditorComponent } from "./app/app.component";

Check failure on line 7 in verify/angular/src/main.ts

View workflow job for this annotation

GitHub Actions / monaco-languageclient

Strings must use singlequote
bootstrapApplication(MonacoEditorComponent);

0 comments on commit 72140a6

Please sign in to comment.