4 ms·
So I have never used Angular before but work with Vue. Looking at the tutorial, why is there the syntax of [(ngModel)] (equivalent would be v-model for me) and
by rukenshia 10y ago
So I have never used Angular before but work with Vue. Looking at the tutorial, why is there the syntax of [(ngModel)] (equivalent would be v-model for me) and ngFor= (v-for)? Why are they different? It looks kind of unnecessary to me. I would really appreciate if someone explained it.
- zygimantasdev 10y ago[()] indicates two-way binding. If you curious you can read more in docs [1], while ngFor is just an attribute directive which changes DOM [2] [1] - https://angular.io/docs/ts/latest/guide/template-syntax.html#!#two-way-binding-with-ngmodel https://angular.io/docs/ts/latest/guide/template-syntax.html... [2] - https://angular.io/docs/ts/latest/guide/attribute-directives.html https://angular.io/docs/ts/latest/guide/attribute-directives...