step 3
This commit is contained in:
parent
850cbcedb4
commit
b79258ea6d
@ -1,9 +1,12 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { PrimeNGConfig } from 'primeng/api';
|
import { PrimeNGConfig } from 'primeng/api';
|
||||||
|
import { RouterOutlet } from '@angular/router';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
templateUrl: './app.component.html'
|
templateUrl: './app.component.html',
|
||||||
|
standalone: true,
|
||||||
|
imports: [RouterOutlet]
|
||||||
})
|
})
|
||||||
export class AppComponent implements OnInit {
|
export class AppComponent implements OnInit {
|
||||||
|
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { HashLocationStrategy, LocationStrategy } from '@angular/common';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
|
||||||
|
|
||||||
import { NotfoundComponent } from './demo/components/notfound/notfound.component';
|
|
||||||
import { ProductService } from './demo/service/product.service';
|
|
||||||
import { CountryService } from './demo/service/country.service';
|
|
||||||
import { CustomerService } from './demo/service/customer.service';
|
|
||||||
import { EventService } from './demo/service/event.service';
|
|
||||||
import { IconService } from './demo/service/icon.service';
|
|
||||||
import { NodeService } from './demo/service/node.service';
|
|
||||||
import { PhotoService } from './demo/service/photo.service';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [AppComponent],
|
|
||||||
imports: [
|
|
||||||
AppRoutingModule,
|
|
||||||
NotfoundComponent
|
|
||||||
],
|
|
||||||
providers: [
|
|
||||||
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
|
||||||
CountryService, CustomerService, EventService, IconService, NodeService,
|
|
||||||
PhotoService, ProductService
|
|
||||||
],
|
|
||||||
bootstrap: [AppComponent]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
24
src/main.ts
24
src/main.ts
@ -1,12 +1,30 @@
|
|||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode, importProvidersFrom } from '@angular/core';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { AppModule } from './app/app.module';
|
|
||||||
import { environment } from './environments/environment';
|
import { environment } from './environments/environment';
|
||||||
|
import { bootstrapApplication } from '@angular/platform-browser';
|
||||||
|
import { AppComponent } from './app/app.component';
|
||||||
|
import { AppRoutingModule } from './app/app-routing.module';
|
||||||
|
import { ProductService } from './app/demo/service/product.service';
|
||||||
|
import { PhotoService } from './app/demo/service/photo.service';
|
||||||
|
import { NodeService } from './app/demo/service/node.service';
|
||||||
|
import { IconService } from './app/demo/service/icon.service';
|
||||||
|
import { EventService } from './app/demo/service/event.service';
|
||||||
|
import { CustomerService } from './app/demo/service/customer.service';
|
||||||
|
import { CountryService } from './app/demo/service/country.service';
|
||||||
|
import { LocationStrategy, HashLocationStrategy } from '@angular/common';
|
||||||
|
|
||||||
if (environment.production) {
|
if (environment.production) {
|
||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
bootstrapApplication(AppComponent, {
|
||||||
|
providers: [
|
||||||
|
importProvidersFrom(AppRoutingModule),
|
||||||
|
{ provide: LocationStrategy, useClass: HashLocationStrategy },
|
||||||
|
CountryService, CustomerService, EventService, IconService, NodeService,
|
||||||
|
PhotoService, ProductService
|
||||||
|
]
|
||||||
|
})
|
||||||
.catch(err => console.error(err));
|
.catch(err => console.error(err));
|
||||||
|
Loading…
Reference in New Issue
Block a user