2021-11-08 11:20:07 +01:00
|
|
|
import { Component, Inject, Input, OnInit } from '@angular/core';
|
2021-11-07 14:52:49 +01:00
|
|
|
import { FormGroup } from '@angular/forms';
|
|
|
|
import { PollService } from '../../../../../core/services/poll.service';
|
2021-11-08 11:20:07 +01:00
|
|
|
import { DOCUMENT } from '@angular/common';
|
2021-11-07 14:52:49 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-step-one',
|
|
|
|
templateUrl: './step-one.component.html',
|
|
|
|
styleUrls: ['./step-one.component.scss'],
|
|
|
|
})
|
|
|
|
export class StepOneComponent implements OnInit {
|
2021-11-08 11:20:07 +01:00
|
|
|
constructor(public pollService: PollService, @Inject(DOCUMENT) private document: any) {}
|
2021-11-07 14:52:49 +01:00
|
|
|
|
|
|
|
@Input()
|
|
|
|
step_max: any;
|
|
|
|
@Input()
|
|
|
|
form: FormGroup;
|
|
|
|
|
2021-11-08 11:20:07 +01:00
|
|
|
ngOnInit(): void {
|
|
|
|
const selector = '#title';
|
|
|
|
const firstField = this.document.querySelector(selector);
|
|
|
|
if (firstField) {
|
|
|
|
firstField.focus();
|
|
|
|
}
|
|
|
|
}
|
2021-11-07 14:52:49 +01:00
|
|
|
}
|