modal-two.component.ts
846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { Component, OnInit } from '@angular/core';
import { SharedServiceService } from '../../services/shared-service.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-modal-two',
templateUrl: './modal-two.component.html',
styleUrls: ['./modal-two.component.css']
})
export class ModalTwoComponent implements OnInit {
title: string;
constructor(private shared: SharedServiceService, private router: Router) {
shared.title$.subscribe(title => {
this.title = title;
});
}
ngOnInit() {
}
btnChange() {
this.shared.changedTitle('modal-two');
}
btnPrev() {
this.router.navigate(['/wizard', 1]);
}
btnClose() {
this.router.navigateByUrl('/dummy').then(() => {
this.router.navigateByUrl('/wizard');
});
// this.shared.changedTitle('wizard');
}
}