2223c9fa6dd92e7e584f22424abd7a1430eeb9da
[ccsdk/cds.git] /
1 import {Component, OnInit} from '@angular/core';
2 import {DesignerStore} from '../designer.store';
3
4 @Component({
5     selector: 'app-functions',
6     templateUrl: './functions.component.html',
7     styleUrls: ['./functions.component.css']
8 })
9 export class FunctionsComponent implements OnInit {
10     viewedFunctions: ModelType[] = [];
11
12     constructor(private designerStore: DesignerStore) {
13
14         this.designerStore.state$.subscribe(state => {
15             console.log(state);
16             if (state.functions) {
17                 this.viewedFunctions = state.functions;
18             }
19         });
20     }
21
22     ngOnInit() {
23         this.designerStore.getFuntions();
24     }
25
26 }