Skip to content

Commit d72a868

Browse files
Update Angular to use standalone components
1 parent 24a6dcf commit d72a868

4 files changed

Lines changed: 8 additions & 36 deletions

File tree

Angular/src/app/app-routing.module.ts

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

Angular/src/app/app.component.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import { Component } from '@angular/core';
2+
import { DxButtonModule } from 'devextreme-angular/ui/button';
23
import { ClickEvent } from 'devextreme/ui/button';
34

45
@Component({
56
selector: 'app-root',
7+
imports: [DxButtonModule],
68
templateUrl: './app.component.html',
79
styleUrls: ['./app.component.scss'],
8-
standalone: false
910
})
1011
export class AppComponent {
1112
title = 'Angular';

Angular/src/app/app.module.ts

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

Angular/src/main.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { provideZoneChangeDetection } from "@angular/core";
2-
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
1+
import { bootstrapApplication } from '@angular/platform-browser';
2+
import { provideZoneChangeDetection } from '@angular/core';
3+
import { AppComponent } from './app/app.component';
34

4-
import { AppModule } from './app/app.module';
5-
6-
platformBrowserDynamic().bootstrapModule(AppModule, { applicationProviders: [provideZoneChangeDetection()], })
7-
.catch((err) => console.error(err));
5+
bootstrapApplication(AppComponent, {
6+
providers: [provideZoneChangeDetection()],
7+
}).catch((err) => console.error(err));

0 commit comments

Comments
 (0)