comparison src/app/visualisations/waveform/waveform.component.ts @ 357:b529a08ddff1

Explicitly state the change detection strategy, despite the fact it will already be OnPush here because its parent is.
author Lucas Thompson <dev@lucas.im>
date Fri, 26 May 2017 18:30:58 +0100
parents b852bace6b14
children a3b45218c311
comparison
equal deleted inserted replaced
356:b852bace6b14 357:b529a08ddff1
1 import { 1 import {
2 Component, 2 Component,
3 Input, 3 Input,
4 ChangeDetectorRef, 4 ChangeDetectorRef,
5 ElementRef, 5 ElementRef,
6 ViewChild 6 ViewChild,
7 ChangeDetectionStrategy
7 } from '@angular/core'; 8 } from '@angular/core';
8 import wavesUI from 'waves-ui-piper'; 9 import wavesUI from 'waves-ui-piper';
9 import {WavesComponent} from '../waves-base.component'; 10 import {WavesComponent} from '../waves-base.component';
10 11
11 12
12 @Component({ 13 @Component({
13 selector: 'ugly-waveform', 14 selector: 'ugly-waveform',
14 templateUrl: '../waves-template.html', 15 templateUrl: '../waves-template.html',
15 styleUrls: ['../waves-template.css'] 16 styleUrls: ['../waves-template.css'],
17 changeDetection: ChangeDetectionStrategy.OnPush
16 }) 18 })
17 export class WaveformComponent extends WavesComponent { 19 export class WaveformComponent extends WavesComponent {
18 @ViewChild('track') trackDiv: ElementRef; 20 @ViewChild('track') trackDiv: ElementRef;
19 @Input() set audioBuffer(buffer: AudioBuffer) { 21 @Input() set audioBuffer(buffer: AudioBuffer) {
20 this._audioBuffer = buffer || undefined; 22 this._audioBuffer = buffer || undefined;