generated from flo/template-frontend
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { BrowserModule } from '@angular/platform-browser';
|
|
import { HttpClientModule } from '@angular/common/http';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
|
|
import { AppComponent } from './app.component';
|
|
import { RouterModule, Routes } from '@angular/router';
|
|
import { SharedModule } from './shared/shared.module';
|
|
import { HomeComponent } from './core/components/home/home.component';
|
|
import { CoreModule } from './core/core.module';
|
|
import { AuthGuard } from './core/guards/auth.guard';
|
|
|
|
const routes: Routes = [
|
|
{ path: 'auth', loadChildren: () => import('./core/auth/auth.module').then(m => m.AuthModule) },
|
|
{ path: 'home', component: HomeComponent, canActivate: [AuthGuard] },
|
|
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
|
];
|
|
|
|
@NgModule({
|
|
declarations: [AppComponent],
|
|
imports: [
|
|
BrowserModule,
|
|
BrowserAnimationsModule,
|
|
HttpClientModule,
|
|
RouterModule.forRoot(routes),
|
|
SharedModule,
|
|
CoreModule,
|
|
],
|
|
providers: [],
|
|
bootstrap: [AppComponent],
|
|
})
|
|
export class AppModule {}
|