blob: 1067658341b9097e4460422a5d8b3f61d01c6571 (
plain)
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
|
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { PackageCreationStore } from '../package-creation.store';
@Component({
selector: 'app-template-mapping',
templateUrl: './template-mapping.component.html',
styleUrls: ['./template-mapping.component.css']
})
export class TemplateMappingComponent implements OnInit {
creationView = true;
listView = false;
constructor(private route: ActivatedRoute, private pakcageStore: PackageCreationStore) {
}
ngOnInit() {
if (this.route.snapshot.paramMap.has('id')) {
console.log('Edit mode');
this.creationView = false;
this.listView = false;
} else {
console.log('Create mode');
this.pakcageStore.clear();
}
}
openCreationView() {
this.creationView = false;
this.listView = true;
}
openListView() {
this.listView = false;
this.creationView = false;
}
}
|