I have following declaration in my component class formErrors:Object;
while using ng build --prod, it throws Type 'Object' is not generic.
but every things working in run time compilation, using ng serve
and i have used the formErrors as below in my template
<div class="col-md-12 col-sm-12 col-xs-12 form-group has-feedback required" [ngClass]="{'has-error':formErrors?.country}">
<input class="form-control has-feedback-left" name="country" [(ngModel)]="customer.country" placeholder="Country" type="text">
<span class="fa fa-map-marker form-control-feedback left" aria-hidden="true"></span>
<span class="help-block" *ngIf="formErrors?.country">{{formErrors?.country[0]}}</span>
</div>