After updating Angular to version 4.1.0 and activating "strictNullChecks" in my project, I am encountering numerous errors in the templates (.html) that look like this:
An object may be 'null'
All these errors are pointing to .html templates similar to this one:
<form class="ui equal width form attached segment" [formGroup]="usrFrm">
<h4 class="ui dividing blue header">User Name</h4>
<div class="fields">
<div class="required field">
<label>Title</label>
<select class="ui dropdown">
<option default><select title&></option>
<option value="1">Ms.</option>
<option value="0">Mr.</option>
</select>
</div>
</div>
<div class="fields">
<div class="required field" [class.error]="usrFrm.touched && usrFrm.get('firstName').invalid">
<label>First name</label>
<input type="text" formControlName="firstName" placeholder="First Name" />
</div>
<div class="field" [class.error]="usrFrm.touched && usrFrm.get('middleName').invalid">
<label>Middle name</label>
<input type="text" formControlName="middleName" placeholder="Middle Name" />
</div>
<div class="required field" [class.error]="usrFrm.touched && usrFrm.get('lastName').invalid">
<label>Last name</label>
<input type="text" formControlName="lastName" placeholder="Last Name" />
</div>
</div>
...
Is there a solution to resolve these issues without disabling "strictNullChecks"?