Why we apply [formGroup] directive to forms under square-brackets while for form-fields we apply formControlName directive without square-brackets?

Viewed 2288

I am following an Angular 4 tutorial about reactive form. While aplying FormGroup and FormControl directives I am finding an inconsistency -

<form [formGroup]="formObj">
<div class="form-group">
<input formControlName="username">

It is applying [formGroup] directive under square-brackets while formControlName directive without square-brackets.

What am I missing here?

2 Answers
Related