comparison 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
comparison
equal deleted inserted replaced
229:efa23f33393b 230:c274af5487c6
1 /**
2 * Created by lucas on 24/04/2017.
3 */
4
5
6 import {ChangeDetectionStrategy, Component, Input} from "@angular/core";
7 @Component({
8 selector: 'ugly-progress-bar',
9 template: `
10 <md-progress-bar
11 [attr.color]="'primary'"
12 [mode]="isDeterminate ? 'determinate' : 'indeterminate'"
13 [value]="progress"
14 ></md-progress-bar>
15 `,
16 changeDetection: ChangeDetectionStrategy.OnPush
17 })
18 export class ProgressBarComponent {
19 @Input() isDeterminate: boolean = false;
20 @Input() progress: number;
21 }