diff options
author | Dan Timoney <dtimoney@att.com> | 2019-01-07 14:58:56 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-01-07 14:58:56 +0000 |
commit | 11ccae6c8da16648f95ee2d5bb8f9a0e088c7c27 (patch) | |
tree | a2e9c6d72d29a3b0041acfafdb2a42309bdaa1c5 /cds-ui/client/src/app | |
parent | e7898dc8254c04bb7ae85128fc8108ebd84499d7 (diff) | |
parent | b761252bca8a91776c8a4bff3141d527d6deeda7 (diff) |
Merge "Core module"
Diffstat (limited to 'cds-ui/client/src/app')
-rw-r--r-- | cds-ui/client/src/app/common/core/core.module.ts | 38 | ||||
-rw-r--r-- | cds-ui/client/src/app/common/core/services/api.service.ts | 52 |
2 files changed, 90 insertions, 0 deletions
diff --git a/cds-ui/client/src/app/common/core/core.module.ts b/cds-ui/client/src/app/common/core/core.module.ts new file mode 100644 index 000000000..9b812a0b3 --- /dev/null +++ b/cds-ui/client/src/app/common/core/core.module.ts @@ -0,0 +1,38 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { HttpClientModule } from '@angular/common/http'; + +import { ApiService } from './services/api.service'; +// import { BlueprintService } from './services/blueprint.service'; + +@NgModule({ + declarations: [ + ], + imports: [ + CommonModule, + HttpClientModule + ], + providers : [ ApiService ] +}) +export class CoreModule { } diff --git a/cds-ui/client/src/app/common/core/services/api.service.ts b/cds-ui/client/src/app/common/core/services/api.service.ts new file mode 100644 index 000000000..0ee3c6a78 --- /dev/null +++ b/cds-ui/client/src/app/common/core/services/api.service.ts @@ -0,0 +1,52 @@ +/* +============LICENSE_START========================================== +=================================================================== +Copyright (C) 2018 IBM Intellectual Property. All rights reserved. +=================================================================== + +Unless otherwise specified, all software contained herein is licensed +under the Apache License, Version 2.0 (the License); +you may not use this software except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +============LICENSE_END============================================ +*/ + + +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { Observable } from 'rxjs'; + +//import { IBlueprintHttp } from '../store/models/blueprint-http.model'; + +@Injectable() +export class ApiService { + // blueprintUrl = '../../constants/blueprint.json'; + + constructor(private _http: HttpClient) { + } + + get(url: string, params?: any): Observable<any> { + return this._http.get(url); + } + + post() { + // to do + } + + put() { + // to do + } + + delete() { + // to do + } + +}
\ No newline at end of file |