File

src/app/modules/shared/services/browser-cache-ttl/browser-cache-ttl.service.ts

Description

Service to fetch user details from server

Index

Properties
Accessors

Constructor

constructor()

Properties

Private _browserCacheTtl
Type : string
Default value : '600'

Contains user id

Accessors

browserCacheTtl
getbrowserCacheTtl()

get method to fetch browserCacheTtl.

Returns : number
import { Injectable } from '@angular/core';
/**
 * Service to fetch user details from server
 *
 */
@Injectable()
export class BrowserCacheTtlService {
  /**
   * Contains user id
   */
  private _browserCacheTtl = '600';
  constructor() {
    try {
      this._browserCacheTtl = document.getElementById('apiCacheTtl')?(<HTMLInputElement>document.getElementById('apiCacheTtl')).value:'';
    } catch (error) {
    }

  }

  /**
   * get method to fetch browserCacheTtl.
   */
  get browserCacheTtl(): number {
    return Number(this._browserCacheTtl);
  }

}

results matching ""

    No results matching ""