/edit-event.component.html Secret
Created
April 21, 2021 19:05
Youtube-Live clone edit-event.component.html file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="app"> | |
<div class="login-page"> | |
<div class="form"> | |
<h4>Update New Event</h4> | |
<form | |
class="login-form" | |
#updateForm="ngForm" | |
(ngSubmit)="submit(updateForm)" | |
> | |
<input | |
placeholder="Title" | |
required | |
minlength="3" | |
[ngModel]="event?.title" | |
name="title" | |
#title="ngModel" | |
id="title" | |
/> | |
<input | |
placeholder="Youtube Link" | |
required | |
minlength="3" | |
[ngModel]="event?.videoId" | |
name="videoId" | |
#videoId="ngModel" | |
id="videoId" | |
/> | |
<input | |
placeholder="Image URL" | |
required | |
minlength="3" | |
[ngModel]="event?.imgURL" | |
name="imgURL" | |
#imgURL="ngModel" | |
id="imgURL" | |
/> | |
<input | |
placeholder="Channel" | |
required | |
minlength="3" | |
[ngModel]="event?.channel" | |
name="channel" | |
#channel="ngModel" | |
id="channel" | |
/> | |
<input | |
placeholder="Description" | |
required | |
minlength="3" | |
[ngModel]="event?.description" | |
name="description" | |
#description="ngModel" | |
id="description" | |
/> | |
<select name="live" [ngModel]="event?.live" #live="ngModel" id="live" required> | |
<option value="" selected>Live?</option> | |
<option value="true">True</option> | |
<option value="false">False</option> | |
</select> | |
<button | |
[style]=" | |
!updateForm.valid || loading | |
? 'background-color: rgb(255, 94, 94);' | |
: '' | |
" | |
type="submit" | |
[disabled]="!updateForm.valid || loading" | |
> | |
{{ loading ? "Updating..." : "Update" }} | |
</button> | |
<p class="message"> | |
Changed your mind? <a [routerLink]="['events', event?.id]">Back to event</a> | |
</p> | |
</form> | |
</div> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment