form control error:ERROR Error: No value accessor for form control with unspecified name attribute
Use ngDefaultControl
directive to make your form has default 2way
binding
<input type="text" [(ngModel)]="name" ngDefaultControl>
This error is emitted, if you forget to specify the name
attribute for an ngModel
.
You can find following line in your html that contains the error:
<span class="badge badge-sm up bg-danger pull-right-xs" [hidden]="notificationCount<=0" [(ngModel)]="notificationCount"></span>
As you can see, there is no name
attribute.