File

src/app/campaigns/campaign-duration.ts

Extends

Compbaser

Implements

AfterViewInit

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector campaign-duration
template
<small class="debug">{{me}}</small>
<span style="font-size: 1em" data-localize="campaignLength">campaign length:</span>
<span id="timelinesTotalLength" style="font-size: 1em">{{m_duration$ | async | FormatSecondsPipe}} </span>

Constructor

constructor(yp: YellowPepperService, cd: ChangeDetectorRef)

Methods

ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnInit
ngOnInit()
Returns : void
destroy
destroy()
Returns : void

Properties

m_duration$
m_duration$: Observable<number>
import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component} from "@angular/core";
import {Compbaser} from "ng-mslib";
import {YellowPepperService} from "../../services/yellowpepper.service";
import {Observable} from "rxjs";

@Component({
    selector: 'campaign-duration',
    changeDetection: ChangeDetectionStrategy.OnPush,
    template: `
        <small class="debug">{{me}}</small>
        <span style="font-size: 1em" data-localize="campaignLength">campaign length:</span>
        <span id="timelinesTotalLength" style="font-size: 1em">{{m_duration$ | async | FormatSecondsPipe}} </span>
    `
})
export class CampaignDuration extends Compbaser implements AfterViewInit {

    m_duration$:Observable<number>;

    constructor(private yp: YellowPepperService, private cd:ChangeDetectorRef) {
        super();
    }

    ngAfterViewInit() {
        this.m_duration$ = this.yp.listenTimelineDurationChanged()
        this.cd.markForCheck()
    }

    ngOnInit() {
    }

    destroy() {
    }
}
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""