Existing model changes 09/83709/2
authorSwapnali Shadanan Pode <sp00501638@techmahindra.com>
Fri, 29 Mar 2019 11:06:41 +0000 (16:36 +0530)
committerSwapnali Pode <sp00501638@techmahindra.com>
Fri, 29 Mar 2019 19:19:44 +0000 (19:19 +0000)
Change-Id: I41ddfbe6780f96b0f6ce6955322fa835162db320
Issue-ID: CCSDK-804
Signed-off-by: sp00501638 <sp00501638@techmahindra.com>
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.html
cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.component.ts

index f780ef8..9fdc388 100644 (file)
 */
 
 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));   
+ }
+
 
 }