From 8e1e7f67cb32bc64db45119754eddbfa487d43fd Mon Sep 17 00:00:00 2001 From: Swapnali Shadanan Pode Date: Tue, 19 Feb 2019 18:52:43 +0530 Subject: Adding changes in existing model Adding search model to existing template Change-Id: I1c9f7b6e444fef585bea621e5017a0f78376885f Issue-ID: CCSDK-804 Signed-off-by: sp00501638 --- .../existing-model/existing-model.component.html | 4 +--- .../existing-model/existing-model.module.ts | 12 ++++++++---- .../search-resource/search-resource.component.html | 15 +++++++++++---- .../search-resource/search-resource.component.ts | 18 +++++++++++++----- 4 files changed, 33 insertions(+), 16 deletions(-) (limited to 'cds-ui/client') 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 747650652..491066310 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,6 +19,4 @@ */--> -

- existing-model works! -

+ \ No newline at end of file diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts index e88f636fe..2963cfc59 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/existing-model.module.ts @@ -20,14 +20,18 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; - +import { SearchResourceComponent } from './search-resource/search-resource.component'; import { ExistingModelRoutingModule } from './existing-model-routing.module'; +import { ExistingModelComponent } from './existing-model.component'; @NgModule({ - declarations: [], + declarations: [ExistingModelComponent,SearchResourceComponent], imports: [ CommonModule, - ExistingModelRoutingModule - ] + ExistingModelRoutingModule, + SearchResourceComponent, + ], + exports:[ExistingModelComponent, + SearchResourceComponent] }) export class ExistingModelModule { } diff --git a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html index 68ea10bb0..ab696286b 100644 --- a/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html +++ b/cds-ui/client/src/app/feature-modules/resource-definition/resource-creation/existing-model/search-resource/search-resource.component.html @@ -18,7 +18,14 @@ * ============LICENSE_END========================================================= */--> - -

- search-resource works! -

+
+ + + + + + {{option}} + + + +
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 8759adf82..16129b74a 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 @@ -19,17 +19,25 @@ */ import { Component, OnInit } from '@angular/core'; - +import {FormBuilder, FormGroup, Validators} from '@angular/forms'; @Component({ selector: 'app-search-resource', templateUrl: './search-resource.component.html', styleUrls: ['./search-resource.component.scss'] }) -export class SearchResourceComponent implements OnInit { +export class SearchResourceComponent implements OnInit { - constructor() { } + myControl: FormGroup; - ngOnInit() { + constructor(private _formBuilder: FormBuilder) { } + + options: string[] = ['One','One1', 'Two', 'Three']; + + ngOnInit() { + this.myControl = this._formBuilder.group({ + search_input: ['', Validators.required] + }); } - + } + -- cgit 1.2.3-korg