</div>
<div id="progress" *ngIf="progressBar.max !== 0">
- <progress [value]="progressBar.value" [max]="progressBar.max"></progress>
+ <progressbar [value]="progressBar.value" [max]="progressBar.max">{{ progressBar.value | bytes }} / {{ progressBar.max | bytes }}</progressbar>
</div>
<input type="submit" value="Upload" class="btn btn-default" [disabled]="!videoForm.form.valid || !fileToUpload">
import { Component, ElementRef, OnInit } from '@angular/core';
import { Router } from '@angular/router-deprecated';
+import { PROGRESSBAR_DIRECTIVES } from 'ng2-bootstrap/components/progressbar';
+import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
+
import { AuthService } from '../../../users/services/auth.service';
import { User } from '../../../users/models/user';
@Component({
selector: 'my-videos-add',
styleUrls: [ 'app/angular/videos/components/add/videos-add.component.css' ],
- templateUrl: 'app/angular/videos/components/add/videos-add.component.html'
+ templateUrl: 'app/angular/videos/components/add/videos-add.component.html',
+ directives: [ PROGRESSBAR_DIRECTIVES ],
+ pipes: [ BytesPipe ]
})
export class VideosAddComponent implements OnInit {
import { Component, OnInit, ElementRef } from '@angular/core';
import { RouteParams, CanDeactivate, ComponentInstruction } from '@angular/router-deprecated';
+
import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
// TODO import it with systemjs