wizard-base.component.ts
790 Bytes
import { Component, OnInit } from '@angular/core';
import { SharedServiceService } from '../services/shared-service.service';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-wizard-base',
templateUrl: './wizard-base.component.html',
styleUrls: ['./wizard-base.component.css']
})
export class WizardBaseComponent implements OnInit {
title: string;
constructor(private shared: SharedServiceService, private router: Router, private route: ActivatedRoute) {
shared.title$.subscribe(title => {
this.title = title;
});
shared.changedTitle('wizard');
}
ngOnInit() {
this.route.params.subscribe(params => {
console.log('wizard loaded');
});
}
openModal() {
this.router.navigate(['/wizard', 1]);
}
}