Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "Inventory App": {
- "AnalyticsUI": "UP",
- "BaseUI": "UP",
- "PlanningUI": "UP",
- "UploadUI": "DOWN"
- }
- }
- export class AppModel {
- constructor(
- public experience: AppList
- ) {}
- }
- export class AppList {
- constructor(
- public appName1: String,
- public appName2: String,
- public appName3: String,
- public appName4: String,
- public appName5: String
- ) {}
- }
- import { AppModel } from './model/appList.model';
- getAppStatus$(): Observable<AppModel> {
- return this.http
- .get('https://abc.xyc.com/AppController/AppsStatus')
- .catch(this._handleError);
- }
- export class MainComponent {
- ......
- appList: AppModel;
- .....
- public _getAppStatus() {
- this.appSub = this.api
- .getAppStatus$()
- .subscribe(
- res => {
- this.appList = res;
- console.log(this.appList);
- console.log(this.appList.experience);
- },
- err => {console.error(err); }
- );
- }
- }
Add Comment
Please, Sign In to add comment