view src/app/progress-bar/progress-bar.ts @ 230:c274af5487c6

Add a progress bar, having issues with md-spinner not updating and also animating when it shouldn't
author Lucas Thompson <dev@lucas.im>
date Mon, 24 Apr 2017 14:40:32 +0100
parents
children 53ea6406d601
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: `
    <md-progress-bar
      [attr.color]="'primary'"
      [mode]="isDeterminate ? 'determinate' : 'indeterminate'"
      [value]="progress"
    ></md-progress-bar>
  `,
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class ProgressBarComponent {
  @Input() isDeterminate: boolean = false;
  @Input() progress: number;
}