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 { private progressionStep = 0; constructor(private config: ConfigService) { } ngOnInit() { } nextPage() { if (this.checkValidity()) { this.progressionStep++; } else { this.displayErrorMessage(); } } checkValidity() { // TODO with form controls return true; } displayErrorMessage() { // TODO return true; } }