|
1 |
| -import { enableProdMode } from '@angular/core'; |
| 1 | +import { enableProdMode, importProvidersFrom } from '@angular/core'; |
2 | 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
3 | 3 |
|
4 |
| -import { AppModule } from './app/app.module'; |
| 4 | + |
5 | 5 | import { environment } from './environments/environment';
|
| 6 | +import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'; |
| 7 | +import { BrowserModule, bootstrapApplication } from '@angular/platform-browser'; |
| 8 | +import { AppRoutingModule } from './app/app-routing.module'; |
| 9 | +import { provideAnimations } from '@angular/platform-browser/animations'; |
| 10 | +import { ReactiveFormsModule } from '@angular/forms'; |
| 11 | +import { MatButtonModule } from '@angular/material/button'; |
| 12 | +import { MatCardModule } from '@angular/material/card'; |
| 13 | +import { MatIconModule } from '@angular/material/icon'; |
| 14 | +import { MatToolbarModule } from '@angular/material/toolbar'; |
| 15 | +import { MatListModule } from '@angular/material/list'; |
| 16 | +import { MatInputModule } from '@angular/material/input'; |
| 17 | +import { MatFormFieldModule } from '@angular/material/form-field'; |
| 18 | +import { MatDialogModule } from '@angular/material/dialog'; |
| 19 | +import { MatStepperModule } from '@angular/material/stepper'; |
| 20 | +import { AppComponent } from './app/app.component'; |
6 | 21 |
|
7 | 22 | if (environment.production) {
|
8 | 23 | enableProdMode();
|
9 | 24 | }
|
10 | 25 |
|
11 |
| -platformBrowserDynamic().bootstrapModule(AppModule) |
| 26 | +bootstrapApplication(AppComponent, { |
| 27 | + providers: [ |
| 28 | + importProvidersFrom(BrowserModule, AppRoutingModule, ReactiveFormsModule, MatButtonModule, MatCardModule, MatIconModule, MatToolbarModule, MatListModule, MatInputModule, MatFormFieldModule, MatDialogModule, MatStepperModule), |
| 29 | + provideHttpClient(withInterceptorsFromDi()), |
| 30 | + provideAnimations() |
| 31 | + ] |
| 32 | +}) |
12 | 33 | .catch(err => console.error(err));
|
0 commit comments