diff options
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts index 16129b74a..7f2745e63 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.ts @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild, EventEmitter, Output } from '@angular/core'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; @Component({ selector: 'app-search-resource', @@ -27,17 +27,18 @@ import {FormBuilder, FormGroup, Validators} from '@angular/forms'; }) export class SearchResourceComponent implements OnInit { - myControl: FormGroup; - + myControl: FormGroup; + @Output() resourcesData = new EventEmitter(); + options: string[] = ['One','One1', 'Two', 'Three']; constructor(private _formBuilder: FormBuilder) { } - options: string[] = ['One','One1', 'Two', 'Three']; - - ngOnInit() { + ngOnInit() { this.myControl = this._formBuilder.group({ search_input: ['', Validators.required] }); } - + selected(value){ + this.resourcesData.emit(value); + } } |