view src/app/progress-bar/progress-bar.ts @ 493:7f9fb84816b9

Introduce a singleton / service for communicating errors / or other notifications (there aren't any yet) - using MdSnackBar internally.
author Lucas Thompson <dev@lucas.im>
date Thu, 06 Jul 2017 19:47:18 +0100
parents 53ea6406d601
children cf4a17efb5d4
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 = false;
  @Input() progress: number;
}