42 lines
861 B
TypeScript
42 lines
861 B
TypeScript
import {Component, OnInit} from '@angular/core';
|
|
import {ProgressionService} from '../progression.service';
|
|
|
|
@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 {
|
|
|
|
private pollConfig: any;
|
|
private progressionStep = 0;
|
|
private progressionStepMax = 0;
|
|
private formIsValid = true;
|
|
|
|
constructor(private progression: ProgressionService) {
|
|
}
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
nextPage() {
|
|
if (this.checkValidity()) {
|
|
this.progressionStep++;
|
|
} else {
|
|
this.displayErrorMessage();
|
|
}
|
|
}
|
|
|
|
checkValidity() {
|
|
return true;
|
|
}
|
|
|
|
displayErrorMessage() {
|
|
return true;
|
|
}
|
|
}
|