Ajout module account + pages + routes
This commit is contained in:
parent
b81ebb7d89
commit
247071b04f
3
db.json
3
db.json
|
@ -6048,5 +6048,6 @@
|
|||
"product_seller": "Truffaut",
|
||||
"product_web_only": "oui"
|
||||
}
|
||||
]
|
||||
],
|
||||
"users" : []
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,6 +33,7 @@
|
|||
"@types/node": "^12.11.1",
|
||||
"@types/underscore": "^1.11.4",
|
||||
"jasmine-core": "~3.10.0",
|
||||
"json-server-auth": "^2.1.0",
|
||||
"karma": "~6.3.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
|
|
|
@ -6,9 +6,14 @@ import { PageNotFoundComponent } from './pages/page-not-found/page-not-found.com
|
|||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'home', pathMatch: 'full' },
|
||||
{ path: 'home', component: PageAccueilComponent },
|
||||
{
|
||||
path: 'home', component: PageAccueilComponent },
|
||||
{ path: 'details', component: PageDetailsComponent },
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
{path : 'account',
|
||||
loadChildren : () => import('./modules/account/account.module')
|
||||
.then(m => m.AccountModule)
|
||||
},
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
|
@ -28,7 +28,9 @@ import { AvisBarComponent } from './components/avis-bar/avis-bar.component';
|
|||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
HttpClientModule
|
||||
HttpClientModule,
|
||||
|
||||
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<div class="navbar-nav">
|
||||
<a routerLink="home" routerLinkActive="active-custom" class="nav-link">Accueil</a>
|
||||
<a routerLink="details" routerLinkActive="active-custom" class="nav-link">Details</a>
|
||||
<a routerLink="account/signin" routerLinkActive="active-custom" class="nav-link">Se connecter</a>
|
||||
<a class="nav-link">Panier</a>
|
||||
<a class="nav-link disabled">Plus d'option bientôt</a>
|
||||
<a class="nav-link disabled" *ngIf="likeCounter == 0"> Pas de plante likée</a>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
|
||||
import { PageResetPasswordComponent } from './pages/page-reset-password/page-reset-password.component';
|
||||
import { PageSigninComponent } from './pages/page-signin/page-signin.component';
|
||||
import { PageSignupComponent } from './pages/page-signup/page-signup.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{path : '', redirectTo:'signin', pathMatch: 'full'},
|
||||
{path : "signin", component : PageSigninComponent},
|
||||
{path : "signup", component : PageSignupComponent},
|
||||
{path : "forgot-password", component : PageForgotPasswordComponent},
|
||||
{path : "reset-password", component : PageResetPasswordComponent}
|
||||
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AccountRoutingModule { }
|
|
@ -0,0 +1,23 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { AccountRoutingModule } from './account-routing.module';
|
||||
import { PageSignupComponent } from './pages/page-signup/page-signup.component';
|
||||
import { PageSigninComponent } from './pages/page-signin/page-signin.component';
|
||||
import { PageForgotPasswordComponent } from './pages/page-forgot-password/page-forgot-password.component';
|
||||
import { PageResetPasswordComponent } from './pages/page-reset-password/page-reset-password.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageSignupComponent,
|
||||
PageSigninComponent,
|
||||
PageForgotPasswordComponent,
|
||||
PageResetPasswordComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
AccountRoutingModule
|
||||
]
|
||||
})
|
||||
export class AccountModule { }
|
|
@ -0,0 +1 @@
|
|||
<p>page-forgot-password works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageForgotPasswordComponent } from './page-forgot-password.component';
|
||||
|
||||
describe('PageForgotPasswordComponent', () => {
|
||||
let component: PageForgotPasswordComponent;
|
||||
let fixture: ComponentFixture<PageForgotPasswordComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageForgotPasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageForgotPasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-forgot-password',
|
||||
templateUrl: './page-forgot-password.component.html',
|
||||
styleUrls: ['./page-forgot-password.component.scss']
|
||||
})
|
||||
export class PageForgotPasswordComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-reset-password works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageResetPasswordComponent } from './page-reset-password.component';
|
||||
|
||||
describe('PageResetPasswordComponent', () => {
|
||||
let component: PageResetPasswordComponent;
|
||||
let fixture: ComponentFixture<PageResetPasswordComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageResetPasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageResetPasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-reset-password',
|
||||
templateUrl: './page-reset-password.component.html',
|
||||
styleUrls: ['./page-reset-password.component.scss']
|
||||
})
|
||||
export class PageResetPasswordComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-signin works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageSigninComponent } from './page-signin.component';
|
||||
|
||||
describe('PageSigninComponent', () => {
|
||||
let component: PageSigninComponent;
|
||||
let fixture: ComponentFixture<PageSigninComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageSigninComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageSigninComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-signin',
|
||||
templateUrl: './page-signin.component.html',
|
||||
styleUrls: ['./page-signin.component.scss']
|
||||
})
|
||||
export class PageSigninComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-signup works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageSignupComponent } from './page-signup.component';
|
||||
|
||||
describe('PageSignupComponent', () => {
|
||||
let component: PageSignupComponent;
|
||||
let fixture: ComponentFixture<PageSignupComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageSignupComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageSignupComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-signup',
|
||||
templateUrl: './page-signup.component.html',
|
||||
styleUrls: ['./page-signup.component.scss']
|
||||
})
|
||||
export class PageSignupComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue