src/app/campaigns/campaign-duration.ts
Compbaser
changeDetection | ChangeDetectionStrategy.OnPush |
selector | campaign-duration |
template |
|
constructor(yp: YellowPepperService, cd: ChangeDetectorRef)
|
Defined in src/app/campaigns/campaign-duration.ts:17
|
ngAfterViewInit |
ngAfterViewInit()
|
Defined in src/app/campaigns/campaign-duration.ts:23
|
Returns :
void
|
ngOnInit |
ngOnInit()
|
Defined in src/app/campaigns/campaign-duration.ts:28
|
Returns :
void
|
destroy |
destroy()
|
Defined in src/app/campaigns/campaign-duration.ts:31
|
Returns :
void
|
m_duration$ |
m_duration$: |
Defined in src/app/campaigns/campaign-duration.ts:17
|
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() {
}
}