1 <h3>Upload a video
</h3>
3 <div *
ngIf=
"error" class=
"alert alert-danger">{{ error }}
</div>
5 <form (ngSubmit)=
"uploadFile()" #
videoForm=
"ngForm">
6 <div class=
"form-group">
7 <label for=
"name">Video name
</label>
9 type=
"text" class=
"form-control" name=
"name" id=
"name" required
10 ngControl=
"name" #
name=
"ngForm"
12 <div [hidden]=
"name.valid || name.pristine" class=
"alert alert-danger">
17 <div class=
"form-group">
18 <div class=
"btn btn-default btn-file">
19 <span>Select the video...
</span>
20 <input type=
"file" name=
"videofile" id=
"videofile">
23 <span *
ngIf=
"fileToUpload">{{ fileToUpload.name }}
</span>
26 <div class=
"form-group">
27 <label for=
"description">Description
</label>
29 name=
"description" id=
"description" class=
"form-control" placeholder=
"Description..." required
30 ngControl=
"description" #
description=
"ngForm"
33 <div [hidden]=
"description.valid || description.pristine" class=
"alert alert-danger">
34 A description is required
38 <div id=
"progress" *
ngIf=
"progressBar.max !== 0">
39 <progressbar [value]=
"progressBar.value" [max]=
"progressBar.max">{{ progressBar.value | bytes }} / {{ progressBar.max | bytes }}
</progressbar>
42 <input type=
"submit" value=
"Upload" class=
"btn btn-default" [disabled]=
"!videoForm.form.valid || !fileToUpload">