File

src/app/about/about.service.ts

Index

Methods
Accessors

Constructor

constructor(sharedAboutService: SharedAboutService)

Constructor

Parameters :
Name Type Optional Description
sharedAboutService SharedAboutService

Methods

getAboutInfo
getAboutInfo(reload?: boolean)

Get Info

Parameters :
Name Type Optional Description
reload boolean true
getDetails
getDetails()

Get details

Accessors

aboutInfo
getaboutInfo()

Get About info

Returns : AboutInfo
featureInfo
getfeatureInfo()

Get Feature Info

Returns : FeatureInfo
setfeatureInfo(featureInfo: )

Set Feature info

Parameters :
Name Type Optional Description
featureInfo
Returns : void
featureInfoSubject
getfeatureInfoSubject()

Get Feature Info Subject

import { Injectable } from '@angular/core';
import { Observable, Subject } from 'rxjs';
import { SharedAboutService } from '../shared/services/shared-about.service';
import { FeatureInfo } from '../shared/model/about/feature-info.model';
import { AboutInfo } from '../shared/model/about/about-info.model';

@Injectable()
export class AboutService {

  /**
   * Constructor
   *
   * @param {SharedAboutService} sharedAboutService
   */
  constructor(private sharedAboutService: SharedAboutService) {
  }

  /**
   * Get About info
   *
   * @returns {AboutInfo}
   */
  public get aboutInfo(): AboutInfo {
    return this.sharedAboutService.aboutInfo;
  }

  /**
   * Get Feature Info
   *
   * @returns {FeatureInfo}
   */
  public get featureInfo(): FeatureInfo {
    return this.sharedAboutService.featureInfo;
  }

  /**
   * Set Feature info
   *
   * @param {FeatureInfo} featureInfo
   */
  public set featureInfo(featureInfo: FeatureInfo) {
    this.sharedAboutService.featureInfo = featureInfo;
  }

  /**
   * Get Feature Info Subject
   * @returns {Subject<FeatureInfo>}
   */
  public get featureInfoSubject(): Subject<FeatureInfo> {
    return this.sharedAboutService.featureInfoSubject;
  }

  /**
   * Get Info
   *
   * @param {boolean} reload
   * @returns {Observable<AboutInfo>}
   */
  getAboutInfo(reload?: boolean): Observable<AboutInfo> {
    if (reload) {
      this.sharedAboutService.loadAboutInfo(reload);
    }
    return this.sharedAboutService.getAboutInfo();
  }

  /**
   * Get details
   * @returns {Observable<AboutInfo>}
   */
  getDetails(): Observable<AboutInfo> {
    return this.sharedAboutService.getAboutInfo();
  }

}

results matching ""

    No results matching ""