Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(angular): fix initAndStart missing parameter #759

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ jobs:
npm run vite:build

- name: Verify
if: github.ref_name == 'main'
shell: bash
run: |
bash ./verify/buildAll.sh
7 changes: 4 additions & 3 deletions verify/angular/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ import { jsonClientUserConfig } from 'monaco-languageclient-examples/json-client
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
styleUrls: ['./app.component.css'],
standalone: true,
})
export class MonacoEditorComponent implements AfterViewInit {
title = 'angular-client';
initDone = false;

async ngAfterViewInit(): Promise<void> {
const wrapper = new MonacoEditorLanguageClientWrapper();

const htmlElement = document.getElementById('monaco-editor-root');
try {
await wrapper.initAndStart(jsonClientUserConfig);
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';
import { MonacoEditorComponent } from './app/app.component';
bootstrapApplication(MonacoEditorComponent);