25 lines
642 B
TypeScript
25 lines
642 B
TypeScript
import { Component, Input, OnInit } from '@angular/core';
|
|
import { FormGroup } from '@angular/forms';
|
|
import { PollService } from '../../../../core/services/poll.service';
|
|
|
|
@Component({
|
|
selector: 'app-step-one',
|
|
templateUrl: './step-one.component.html',
|
|
styleUrls: ['./step-one.component.scss'],
|
|
})
|
|
export class StepOneComponent implements OnInit {
|
|
constructor(private pollService: PollService) {}
|
|
|
|
@Input()
|
|
step_max: any;
|
|
@Input()
|
|
form: FormGroup;
|
|
|
|
ngOnInit(): void {}
|
|
|
|
public updateSlug(): void {
|
|
const newValueFormatted = 'TODO';
|
|
this.form.patchValue({ slug: this.pollService.makeSlug(this.form.value['custom_url']) });
|
|
}
|
|
}
|