blob: e1e980ed9f314f102e4b0069862d77c0565d45ab (
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
|
import {Component, OnInit} from '@angular/core';
import {DesignerStore} from '../designer.store';
import {ModelType} from '../model/ModelType.model';
@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.serverFunctions) {
this.viewedFunctions = state.serverFunctions;
}
});
}
ngOnInit() {
this.designerStore.retrieveFuntions();
}
}
|