aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.ts
blob: 5a86150e8cb44b6401e5aed47a0a4fcaca40963c (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.functions) {
                this.viewedFunctions = state.functions;
            }
        });
    }

    ngOnInit() {
        this.designerStore.getFuntions();
    }

}