view src/app/progress-bar/progress-bar.ts @ 505:cf4a17efb5d4

Update angular deps, fix material api changes. (currently running an earlier TypeScript version due to restrictions from angular)
author Lucas Thompson <dev@lucas.im>
date Thu, 12 Oct 2017 13:12:33 +0100
parents 53ea6406d601
children
line wrap: on
line source
/**
 * Created by lucas on 24/04/2017.
 */


import {ChangeDetectionStrategy, Component, Input} from '@angular/core';
@Component({
  selector: 'ugly-progress-bar',
  template: `
    <mat-progress-bar
      [attr.color]="'primary'"
      [mode]="isDeterminate ? 'determinate' : 'indeterminate'"
      [value]="progress"
    ></mat-progress-bar>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ProgressBarComponent {
  @Input() isDeterminate = false;
  @Input() progress: number;
}