blob: 2223c9fa6dd92e7e584f22424abd7a1430eeb9da (
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
|
import {Component, OnInit} from '@angular/core';
import {DesignerStore} from '../designer.store';
@Component({
selector: 'app-functions',
templateUrl: './functions.component.html',
styleUrls: ['./functions.component.css']
})
export class FunctionsComponent implements OnInit {
viewedFunctions: ModelType[] = [];
constructor(private designerStore: DesignerStore) {
this.designerStore.state$.subscribe(state => {
console.log(state);
if (state.functions) {
this.viewedFunctions = state.functions;
}
});
}
ngOnInit() {
this.designerStore.getFuntions();
}
}
|