Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit 4a40188

Browse files
committed
mis a jour du app module
1 parent 675eafc commit 4a40188

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/app/app.module.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@ import { NgModule } from '@angular/core';
22
import { BrowserModule } from '@angular/platform-browser';
33
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
44
import { StoreModule } from '@ngrx/store';
5-
import { FormsModule } from '@angular/forms';
5+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
66

77
import { AppRoutingModule } from './core/routes/app-routing.module';
88
import { AppComponent } from './core/components/app/app.component';
9-
import { ThemeModule } from './shared/themes/theme.module';
109

1110
@NgModule({
1211
declarations: [
@@ -17,10 +16,10 @@ import { ThemeModule } from './shared/themes/theme.module';
1716
BrowserAnimationsModule,
1817
BrowserModule,
1918
FormsModule,
19+
ReactiveFormsModule,
2020
StoreModule.forRoot({}, {}),
21-
ThemeModule,
2221
],
2322
providers: [],
24-
bootstrap: [AppComponent]
23+
bootstrap: [AppComponent],
2524
})
2625
export class AppModule { }

src/app/core/guards/auth.guard.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { Injectable } from '@angular/core';
2-
import { CanActivate } from '@angular/router';
2+
import { ActivatedRouteSnapshot, CanActivateChild, RouterStateSnapshot } from '@angular/router';
33

44
@Injectable({
55
providedIn: 'root'
66
})
7-
export class AuthGuard implements CanActivate {
7+
export class AuthGuard implements CanActivateChild {
88

9-
canActivate(): boolean {
9+
canActivateChild(
10+
childRoute: ActivatedRouteSnapshot,
11+
state: RouterStateSnapshot
12+
): boolean {
1013
return true;
1114
}
1215

0 commit comments

Comments
 (0)