diff options
author | 2019-08-22 23:08:39 +0530 | |
---|---|---|
committer | 2019-08-22 23:08:46 +0530 | |
commit | 5306da4cdbd068ec0785a785cc8d24bb1f03f549 (patch) | |
tree | 3992d1abbbeaa31cae093eb209dedd4cc80e911b /cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts | |
parent | b496e93839fba89a8ea2ab026954a6f6359bc4c2 (diff) |
Passing Option from Search DB to metadata
Changes to make metadata and editor option based Search from db buttons
Change-Id: I93f1f2658b2c2d4ba11f35cc44c190998c08381d
Issue-ID: CCSDK-1275
Signed-off-by: Ezhilarasi <ezhrajam@in.ibm.com>
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts index fa18cbd25..d6bcfb33b 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/select-template.service.ts @@ -20,21 +20,29 @@ limitations under the License. */ import { Injectable } from '@angular/core'; -import { Observable, of } from 'rxjs'; +import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class SelectTemplateService { cbaOption: string; + private messageSource = new BehaviorSubject('default message'); + currentMessage = this.messageSource.asObservable(); constructor() { } setCbaOption(option: string) { - this.cbaOption = option; - } - - getCbaOption(): Observable<string> { - return of(this.cbaOption); + this.messageSource.next(option); } + // setCbaOption(option: string) { + // this.cbaOption = option; + // console.log("CBA option set to"+this.cbaOption+":"+option); + // } + + // getCbaOption(): Observable<any> { + // console.log("CBA option is "+this.cbaOption); + // // return of(this.cbaOption); + // return this.cbaOption.asObservable(); + // } } |