création structure
This commit is contained in:
parent
73897ea5b4
commit
4bbf8906e8
|
@ -14,6 +14,10 @@ const routes: Routes = [
|
|||
loadChildren: () => import('./modules/account/account.module')
|
||||
.then(m => m.AccountModule)
|
||||
},
|
||||
{ path: 'admin',
|
||||
loadChildren: () => import('./modules/admin/admin.module')
|
||||
.then(m => m.AdminModule)
|
||||
},
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
];
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { PageAjouterComponent } from './pages/page-ajouter/page-ajouter.component';
|
||||
import { PageModifierComponent } from './pages/page-modifier/page-modifier.component';
|
||||
import { PageTableauComponent } from './pages/page-tableau/page-tableau.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: 'tableau', pathMatch: 'full'},
|
||||
{ path: 'modifier', component: PageModifierComponent },
|
||||
{ path: 'ajouter', component: PageAjouterComponent },
|
||||
{ path: 'tableau', component: PageTableauComponent },
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forChild(routes)],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AdminRoutingModule { }
|
|
@ -0,0 +1,27 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { PageTableauComponent } from './pages/page-tableau/page-tableau.component';
|
||||
import { PageAjouterComponent } from './pages/page-ajouter/page-ajouter.component';
|
||||
import { PageModifierComponent } from './pages/page-modifier/page-modifier.component';
|
||||
import { FormulaireComponent } from './components/formulaire/formulaire.component';
|
||||
import { AdminRoutingModule } from './admin-routing.module';
|
||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
PageTableauComponent,
|
||||
PageAjouterComponent,
|
||||
PageModifierComponent,
|
||||
FormulaireComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
AdminRoutingModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule
|
||||
]
|
||||
})
|
||||
export class AdminModule { }
|
|
@ -0,0 +1 @@
|
|||
<p>formulaire works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FormulaireComponent } from './formulaire.component';
|
||||
|
||||
describe('FormulaireComponent', () => {
|
||||
let component: FormulaireComponent;
|
||||
let fixture: ComponentFixture<FormulaireComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ FormulaireComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FormulaireComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,15 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-formulaire',
|
||||
templateUrl: './formulaire.component.html',
|
||||
styleUrls: ['./formulaire.component.scss']
|
||||
})
|
||||
export class FormulaireComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-ajouter works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageAjouterComponent } from './page-ajouter.component';
|
||||
|
||||
describe('PageAjouterComponent', () => {
|
||||
let component: PageAjouterComponent;
|
||||
let fixture: ComponentFixture<PageAjouterComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageAjouterComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageAjouterComponent);
|
||||
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-ajouter',
|
||||
templateUrl: './page-ajouter.component.html',
|
||||
styleUrls: ['./page-ajouter.component.scss']
|
||||
})
|
||||
export class PageAjouterComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-modifier works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageModifierComponent } from './page-modifier.component';
|
||||
|
||||
describe('PageModifierComponent', () => {
|
||||
let component: PageModifierComponent;
|
||||
let fixture: ComponentFixture<PageModifierComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageModifierComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageModifierComponent);
|
||||
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-modifier',
|
||||
templateUrl: './page-modifier.component.html',
|
||||
styleUrls: ['./page-modifier.component.scss']
|
||||
})
|
||||
export class PageModifierComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<p>page-tableau works!</p>
|
|
@ -0,0 +1,25 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageTableauComponent } from './page-tableau.component';
|
||||
|
||||
describe('PageTableauComponent', () => {
|
||||
let component: PageTableauComponent;
|
||||
let fixture: ComponentFixture<PageTableauComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageTableauComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageTableauComponent);
|
||||
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-tableau',
|
||||
templateUrl: './page-tableau.component.html',
|
||||
styleUrls: ['./page-tableau.component.scss']
|
||||
})
|
||||
export class PageTableauComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AdminService } from './admin.service';
|
||||
|
||||
describe('AdminService', () => {
|
||||
let service: AdminService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(AdminService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AdminService {
|
||||
|
||||
constructor() { }
|
||||
}
|
Loading…
Reference in New Issue