diff options
2 files changed, 25 insertions, 3 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html index 491066310..4a738b79c 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html @@ -19,4 +19,4 @@ */--> -<app-search-resource></app-search-resource>
\ No newline at end of file +<app-search-resource (resourcesData)="selectedResource($event)"></app-search-resource>
\ No newline at end of file diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts index f780ef851..9fdc38886 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts @@ -19,6 +19,10 @@ */ import { Component, OnInit } from '@angular/core'; +import { Store } from '@ngrx/store'; +import { IResources } from 'src/app/common/core/store/models/resources.model'; +import { IAppState } from 'src/app/common/core/store/state/app.state'; +import { LoadResourcesSuccess } from 'src/app/common/core/store/actions/resources.action'; @Component({ selector: 'app-existing-model', @@ -27,9 +31,27 @@ import { Component, OnInit } from '@angular/core'; }) export class ExistingModelComponent implements OnInit { - constructor() { } + resourceName:string; + + constructor(private store: Store<IAppState>) { } ngOnInit() { - } + } + + selectedResource(value){ + console.log(value); + this.resourceName=value; + } + + getDataUsingResouceName(){ + + } + + updateResourcesState() { + var me = this; + var data:IResources; + me.store.dispatch(new LoadResourcesSuccess(data)); + } + } |