Guest User

Untitled

a guest
Nov 21st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. {
  2. "Inventory App": {
  3. "AnalyticsUI": "UP",
  4. "BaseUI": "UP",
  5. "PlanningUI": "UP",
  6. "UploadUI": "DOWN"
  7. }
  8. }
  9.  
  10. export class AppModel {
  11. constructor(
  12. public experience: AppList
  13. ) {}
  14. }
  15.  
  16. export class AppList {
  17. constructor(
  18. public appName1: String,
  19. public appName2: String,
  20. public appName3: String,
  21. public appName4: String,
  22. public appName5: String
  23. ) {}
  24. }
  25.  
  26. import { AppModel } from './model/appList.model';
  27. getAppStatus$(): Observable<AppModel> {
  28. return this.http
  29. .get('https://abc.xyc.com/AppController/AppsStatus')
  30. .catch(this._handleError);
  31. }
  32.  
  33. export class MainComponent {
  34. ......
  35. appList: AppModel;
  36. .....
  37.  
  38. public _getAppStatus() {
  39. this.appSub = this.api
  40. .getAppStatus$()
  41. .subscribe(
  42. res => {
  43. this.appList = res;
  44. console.log(this.appList);
  45. console.log(this.appList.experience);
  46. },
  47. err => {console.error(err); }
  48. );
  49. }
  50. }
Add Comment
Please, Sign In to add comment