import { CurrencyPipe } from "@angular/common" ; import { Component } from "@angular/core" ; import { ApiService } from "jslib-common/abstractions/api.service" ; import { I18nService } from "jslib-common/abstractions/i18n.service" ; import { LogService } from "jslib-common/abstractions/log.service" ; import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service" ; import { UserService } from "jslib-common/abstractions/user.service" ; import { PremiumComponent as BasePremiumComponent } from "jslib-angular/components/premium.component" ; @ Component ( { selector : "app-premium" , templateUrl : "premium.component.html" , } ) export class PremiumComponent extends BasePremiumComponent { priceString : string ; constructor ( i18nService , platformUtilsService , apiService , userService , private currencyPipe , logService ) { super ( i18nService , platformUtilsService , apiService , userService , logService ) ; const thePrice = this . currencyPipe . transform ( this . price , "$" ) ; this . priceString = i18nService . t ( "premiumPrice" , thePrice ) ; if ( this . priceString . indexOf ( "%price%" ) > - 1 ) { this . priceString = this . priceString . replace ( "%price%" , thePrice ) ; } } }