ResultEditComponent

The ResultEditComponent can also be upgraded just like the previous ones; yet, it features another slightly different logic--the MinValue and MaxValue properties, both of them having a nullable number type. The scenario is similar to the AnswerEditComponent Value property, which we faced in the previous paragraph, except that we now have two <input type="number"> instead of a single <select>.

Luckily enough, it doesn't change how we can handle it in the component template file:

[...]<div class="form-group"        [ngClass]="{ 'has-error has-feedback' : hasError('MinValue')                                                          }">    <label for="MinValue">Minimum Score Value:</label>    <br />    <input type="number" id="MinValue" name="MinValue"            formControlName="MinValue"  class="form-control" ...

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.