forked from tykayn/funky-framadate-front
update title step of html page
This commit is contained in:
parent
48637c5d54
commit
4587d3eb52
@ -22,21 +22,21 @@ export class StepOneComponent implements OnInit {
|
|||||||
public pollService: PollService,
|
public pollService: PollService,
|
||||||
@Inject(DOCUMENT) private document: any,
|
@Inject(DOCUMENT) private document: any,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private titleService: Title,
|
private titleService: Title
|
||||||
private confirmationService: ConfirmationService
|
|
||||||
) {
|
) {
|
||||||
this.step_max = this.pollService.step_max;
|
this.step_max = this.pollService.step_max;
|
||||||
this.titleService.setTitle(' Création de sondage - ' + environment.appTitle);
|
this.pollService.step_current = 1;
|
||||||
|
this.titleService.setTitle(
|
||||||
|
' Création de sondage - Étape ' +
|
||||||
|
this.pollService.step_current +
|
||||||
|
' sur ' +
|
||||||
|
this.pollService.step_max +
|
||||||
|
' ' +
|
||||||
|
environment.appTitle
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {}
|
||||||
this.pollService.step_current = 1;
|
|
||||||
const selector = '#title';
|
|
||||||
const firstField = this.document.querySelector(selector);
|
|
||||||
if (firstField) {
|
|
||||||
firstField.focus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
leave(event: any) {
|
leave(event: any) {
|
||||||
console.log('event', event);
|
console.log('event', event);
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { Component, Input, OnInit } from '@angular/core';
|
import { Component, Input, OnInit } from '@angular/core';
|
||||||
import { PollService } from '../../../../../core/services/poll.service';
|
import { PollService } from '../../../../../core/services/poll.service';
|
||||||
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop';
|
||||||
|
import { environment } from '../../../../../../environments/environment';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-step-three',
|
selector: 'app-step-three',
|
||||||
@ -13,8 +15,17 @@ export class StepThreeComponent implements OnInit {
|
|||||||
@Input()
|
@Input()
|
||||||
form: any;
|
form: any;
|
||||||
|
|
||||||
constructor(public pollService: PollService) {
|
constructor(public pollService: PollService, private titleService: Title) {
|
||||||
this.pollService.step_current = 3;
|
this.pollService.step_current = 3;
|
||||||
|
this.step_max = this.pollService.step_max;
|
||||||
|
this.titleService.setTitle(
|
||||||
|
' Création de sondage - Étape ' +
|
||||||
|
this.pollService.step_current +
|
||||||
|
' sur ' +
|
||||||
|
this.pollService.step_max +
|
||||||
|
' ' +
|
||||||
|
environment.appTitle
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {}
|
ngOnInit(): void {}
|
||||||
|
@ -8,6 +8,8 @@ import { ToastService } from '../../../../../core/services/toast.service';
|
|||||||
import { PollService } from '../../../../../core/services/poll.service';
|
import { PollService } from '../../../../../core/services/poll.service';
|
||||||
import { DateUtilitiesService } from '../../../../../core/services/date.utilities.service';
|
import { DateUtilitiesService } from '../../../../../core/services/date.utilities.service';
|
||||||
import { ApiService } from '../../../../../core/services/api.service';
|
import { ApiService } from '../../../../../core/services/api.service';
|
||||||
|
import { environment } from '../../../../../../environments/environment';
|
||||||
|
import { Title } from '@angular/platform-browser';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-step-two',
|
selector: 'app-step-two',
|
||||||
@ -34,6 +36,7 @@ export class StepTwoComponent implements OnInit {
|
|||||||
private toastService: ToastService,
|
private toastService: ToastService,
|
||||||
public pollService: PollService,
|
public pollService: PollService,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
|
private titleService: Title,
|
||||||
public dateUtilities: DateUtilitiesService,
|
public dateUtilities: DateUtilitiesService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
@Inject(DOCUMENT) private document: any
|
@Inject(DOCUMENT) private document: any
|
||||||
@ -41,6 +44,14 @@ export class StepTwoComponent implements OnInit {
|
|||||||
this.form = this.pollService.form;
|
this.form = this.pollService.form;
|
||||||
this.pollService.step_current = 2;
|
this.pollService.step_current = 2;
|
||||||
this.step_max = this.pollService.step_max;
|
this.step_max = this.pollService.step_max;
|
||||||
|
this.titleService.setTitle(
|
||||||
|
' Création de sondage - Étape ' +
|
||||||
|
this.pollService.step_current +
|
||||||
|
' sur ' +
|
||||||
|
this.pollService.step_max +
|
||||||
|
' ' +
|
||||||
|
environment.appTitle
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
get choices(): FormArray {
|
get choices(): FormArray {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user