forked from tykayn/funky-framadate-front
🚑 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 {AppRoutingModule} from './app-routing.module';
|
||||||
import {AppComponent} from './app.component';
|
import {AppComponent} from './app.component';
|
||||||
import {FormContainerComponent} from './form-container/form-container.component';
|
|
||||||
import {BaseComponent} from './pages/base-page/base.component';
|
import {BaseComponent} from './pages/base-page/base.component';
|
||||||
import {KindComponent} from './pages/kind/kind.component';
|
import {KindComponent} from './pages/kind/kind.component';
|
||||||
import {HeaderComponent} from './header/header.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 { VotingGraphComponent } from './pages/voting-graph/voting-graph.component';
|
||||||
import { VotingChoiceComponent } from './pages/voting-choice/voting-choice.component';
|
import { VotingChoiceComponent } from './pages/voting-choice/voting-choice.component';
|
||||||
import { PasswordComponent } from './pages/password/password.component';
|
import { PasswordComponent } from './pages/password/password.component';
|
||||||
|
import { HomeComponent } from './pages/home/home.component';
|
||||||
|
|
||||||
registerLocaleData(localeFr, 'fr');
|
registerLocaleData(localeFr, 'fr');
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
AppComponent,
|
AppComponent,
|
||||||
FormContainerComponent,
|
|
||||||
BaseComponent,
|
BaseComponent,
|
||||||
KindComponent,
|
KindComponent,
|
||||||
HeaderComponent,
|
HeaderComponent,
|
||||||
@ -52,6 +51,7 @@ registerLocaleData(localeFr, 'fr');
|
|||||||
VotingGraphComponent,
|
VotingGraphComponent,
|
||||||
VotingChoiceComponent,
|
VotingChoiceComponent,
|
||||||
PasswordComponent,
|
PasswordComponent,
|
||||||
|
HomeComponent,
|
||||||
|
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import {FormContainerComponent} from '../form-container/form-container.component';
|
|
||||||
import {KindComponent} from '../pages/kind/kind.component';
|
import {KindComponent} from '../pages/kind/kind.component';
|
||||||
import {DatesComponent} from '../pages/dates/dates.component';
|
import {DatesComponent} from '../pages/dates/dates.component';
|
||||||
import {VisibilityComponent} from '../pages/visibility/visibility.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 {AnswersComponent} from '../pages/answers/answers.component';
|
||||||
import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component';
|
import {CreateOrRetrieveComponent} from '../pages/create-or-retrieve/create-or-retrieve.component';
|
||||||
import {BaseComponent} from '../pages/base-page/base.component';
|
import {BaseComponent} from '../pages/base-page/base.component';
|
||||||
|
import {HomeComponent} from "../pages/home/home.component";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* each step in the form is a component
|
* each step in the form is a component
|
||||||
@ -15,7 +15,7 @@ import {BaseComponent} from '../pages/base-page/base.component';
|
|||||||
export const Routes =
|
export const Routes =
|
||||||
[
|
[
|
||||||
{path: '', component: CreateOrRetrieveComponent},
|
{path: '', component: CreateOrRetrieveComponent},
|
||||||
{path: 'home', component: FormContainerComponent},
|
{path: 'home', component: HomeComponent},
|
||||||
{path: 'base', component: BaseComponent},
|
{path: 'base', component: BaseComponent},
|
||||||
{path: 'step/creation', component: CreateOrRetrieveComponent},
|
{path: 'step/creation', component: CreateOrRetrieveComponent},
|
||||||
{path: 'step/date', component: DatesComponent},
|
{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 { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { FormContainerComponent } from './form-container.component';
|
import { HomeComponent } from './home.component';
|
||||||
|
|
||||||
describe('FormContainerComponent', () => {
|
describe('HomeComponent', () => {
|
||||||
let component: FormContainerComponent;
|
let component: HomeComponent;
|
||||||
let fixture: ComponentFixture<FormContainerComponent>;
|
let fixture: ComponentFixture<HomeComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ FormContainerComponent ]
|
declarations: [ HomeComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(FormContainerComponent);
|
fixture = TestBed.createComponent(HomeComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
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>
|
<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>
|
</p>
|
||||||
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a>
|
<a [routerLink]="'/step/end'" class="btn btn-block" i18n="@@confirm">C'est parfait!</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user