31 lines
859 B
TypeScript
31 lines
859 B
TypeScript
import { Component, Input, OnInit } from '@angular/core';
|
|
import { BaseComponent } from '../../pages/example/base-page/base.component';
|
|
|
|
import { Router } from '@angular/router';
|
|
import { ConfigService } from '../../services/config.service';
|
|
|
|
@Component({
|
|
selector: 'framadate-navigation',
|
|
templateUrl: './navigation.component.html',
|
|
styleUrls: ['./navigation.component.scss'],
|
|
})
|
|
export class NavigationComponent extends BaseComponent implements OnInit {
|
|
@Input() public step = 'home';
|
|
|
|
constructor(public config: ConfigService, public route: Router) {
|
|
super(config);
|
|
}
|
|
|
|
ngOnInit() {}
|
|
|
|
nextPage() {
|
|
if (this.checkValidity()) {
|
|
if (this.config.step < this.config.stepMax) {
|
|
this.config.step++;
|
|
}
|
|
} else {
|
|
this.displayErrorMessage();
|
|
}
|
|
}
|
|
}
|