mirror of
https://framagit.org/framasoft/framadate/funky-framadate-front.git
synced 2023-08-25 13:53:14 +02:00
🚑 change form-container to home component
This commit is contained in:
parent
018b1ce83e
commit
d2478c37a4
@ -3,7 +3,6 @@ import {NgModule} from '@angular/core';
|
||||
|
||||
import {AppRoutingModule} from './app-routing.module';
|
||||
import {AppComponent} from './app.component';
|
||||
import {FormContainerComponent} from './form-container/form-container.component';
|
||||
import {BaseComponent} from './pages/base-page/base.component';
|
||||
import {KindComponent} from './pages/kind/kind.component';
|
||||
import {HeaderComponent} from './header/header.component';
|
||||
@ -28,13 +27,13 @@ import { VotingSummaryComponent } from './pages/voting-summary/voting-summary.co
|
||||
import { VotingGraphComponent } from './pages/voting-graph/voting-graph.component';
|
||||
import { VotingChoiceComponent } from './pages/voting-choice/voting-choice.component';
|
||||
import { PasswordComponent } from './pages/password/password.component';
|
||||
import { HomeComponent } from './pages/home/home.component';
|
||||
|
||||
registerLocaleData(localeFr, 'fr');
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
FormContainerComponent,
|
||||
BaseComponent,
|
||||
KindComponent,
|
||||
HeaderComponent,
|
||||
@ -52,6 +51,7 @@ registerLocaleData(localeFr, 'fr');
|
||||
VotingGraphComponent,
|
||||
VotingChoiceComponent,
|
||||
PasswordComponent,
|
||||
HomeComponent,
|
||||
|
||||
],
|
||||
imports: [
|
||||
|
@ -1,4 +1,3 @@
|
||||
import {FormContainerComponent} from '../form-container/form-container.component';
|
||||
import {KindComponent} from '../pages/kind/kind.component';
|
||||
import {DatesComponent} from '../pages/dates/dates.component';
|
||||
import {VisibilityComponent} from '../pages/visibility/visibility.component';
|
||||
@ -8,6 +7,7 @@ import {EndConfirmationComponent} from '../pages/end-confirmation/end-confirmati
|
||||
import {AnswersComponent} from '../pages/answers/answers.component';
|
||||
import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component';
|
||||
import {BaseComponent} from '../pages/base-page/base.component';
|
||||
import {HomeComponent} from "../pages/home/home.component";
|
||||
|
||||
/**
|
||||
* each step in the form is a component
|
||||
@ -15,7 +15,7 @@ import {BaseComponent} from '../pages/base-page/base.component';
|
||||
export const Routes =
|
||||
[
|
||||
{path: '', component: CreateOrRetrieveComponent},
|
||||
{path: 'home', component: FormContainerComponent},
|
||||
{path: 'home', component: HomeComponent},
|
||||
{path: 'base', component: BaseComponent},
|
||||
{path: 'step/creation', component: CreateOrRetrieveComponent},
|
||||
{path: 'step/date', component: DatesComponent},
|
||||
|
@ -1,25 +0,0 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ConfigService} from '../config.service';
|
||||
|
||||
// import {PollConfig} from '../config/PollConfig';
|
||||
|
||||
@Component({
|
||||
selector: 'framadate-form-container',
|
||||
templateUrl: './form-container.component.html',
|
||||
styleUrls: ['./form-container.component.scss']
|
||||
})
|
||||
/**
|
||||
* gestion de la progression dans le formulaire.
|
||||
* à chaque étape correspond un composant de page
|
||||
*/
|
||||
export class FormContainerComponent implements OnInit {
|
||||
|
||||
constructor(public config: ConfigService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FormContainerComponent } from './form-container.component';
|
||||
import { HomeComponent } from './home.component';
|
||||
|
||||
describe('FormContainerComponent', () => {
|
||||
let component: FormContainerComponent;
|
||||
let fixture: ComponentFixture<FormContainerComponent>;
|
||||
describe('HomeComponent', () => {
|
||||
let component: HomeComponent;
|
||||
let fixture: ComponentFixture<HomeComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ FormContainerComponent ]
|
||||
declarations: [ HomeComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FormContainerComponent);
|
||||
fixture = TestBed.createComponent(HomeComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
19
src/app/pages/home/home.component.ts
Normal file
19
src/app/pages/home/home.component.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
import {ConfigService} from "../../config.service";
|
||||
|
||||
@Component({
|
||||
selector: 'framadate-home',
|
||||
templateUrl: './home.component.html',
|
||||
styleUrls: ['./home.component.scss']
|
||||
})
|
||||
export class HomeComponent implements OnInit {
|
||||
|
||||
|
||||
constructor(public config: ConfigService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<h1>page de démo</h1>
|
||||
<p>cette étape est en cours de développement. <br> S'inspirer de la page de FormContainer pour réaliser d'autres pages
|
||||
<p>cette étape est en cours de développement. <br> S'inspirer de la page de Home pour réaliser d'autres pages
|
||||
</p>
|
||||
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a>
|
||||
|
Loading…
Reference in New Issue
Block a user