import { ChangeDetectionStrategy , Component , Input } from '@angular/core' ; import { Tile } from '@core/classes/tile.class' ; import { DashboardFacadeService } from '@store/dashboard' ; import { PricesFacadeService } from '@store/prices/prices-facade.service' ; @ Component ( { selector : 'cf-tile' , templateUrl : './tile.component.html' , styleUrls : [ './tile.component.scss' ] , changeDetection : ChangeDetectionStrategy . OnPush } ) export class TileComponent { @ Input ( ) tile : Tile ; constructor ( private dashboardFacade , private pricesFacade ) { } updateTile ( assetId ) { this . dashboardFacade . updateTileAsset ( this . tile . id , assetId ) ; this . pricesFacade . createPriceSubscription ( assetId ) ; } }