comparison src/app/progress-spinner/progress-spinner.component.ts @ 236:53ea6406d601

Generate new project with latest @angular/cli, including Angular 4.
author Lucas Thompson <dev@lucas.im>
date Tue, 25 Apr 2017 20:01:09 +0100
parents 1c1cc4ec183c
children cf4a17efb5d4
comparison
equal deleted inserted replaced
235:76f2cd2c5a68 236:53ea6406d601
1 /** 1 /**
2 * Created by lucast on 14/03/2017. 2 * Created by lucast on 14/03/2017.
3 */ 3 */
4 4
5 5
6 import {Component, Input} from "@angular/core"; 6 import {Component, Input} from '@angular/core';
7 @Component({ 7 @Component({
8 selector: 'ugly-progress-spinner', 8 selector: 'ugly-progress-spinner',
9 template: ` 9 template: `
10 <div class="container" [hidden]="!isVisible"> 10 <div class="container" [hidden]="!isVisible">
11 <md-spinner 11 <md-spinner
30 height: 100%; 30 height: 100%;
31 } 31 }
32 `] 32 `]
33 }) 33 })
34 export class ProgressSpinnerComponent { 34 export class ProgressSpinnerComponent {
35 private currentProcess: number = 0; 35 private currentProcess = 0;
36 36
37 @Input() isVisible: boolean = true; 37 @Input() isVisible = true;
38 @Input() isDeterminate: boolean = false; 38 @Input() isDeterminate = false;
39 @Input() 39 @Input()
40 set progress(value: number) { 40 set progress(value: number) {
41 if (value < 0) { 41 if (value < 0) {
42 this.currentProcess = 0; 42 this.currentProcess = 0;
43 } else if (value > 100) { 43 } else if (value > 100) {