python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
index angular2

What Is the Difference Between [ngFor] and [ngForOf] in Angular 2?

Angular 2 - ngFor vs. ngForOf

1.     The [ngFor] is not a type safe
2.     The [NgForOf] is a type Safe
3.     The [NgFor] directive instantiates a template once per item from iterate
4.     The [ngFor] and [ngForOf] are actually the selectors of the [NgForOf] directive and it is not two distinct things
5.     The [ngFor] will be works like as collections
6.     The [ngForOf] will be works like as generics

Stayed Informed - Angular 2 Q/A

Example - ngFor

<div *ngFor="let user of users" let i=index;>{{i}} - {{}}</div>


     <div [ngFor]="let user of users" let i=index;>{{i}} - {{}}</div>

Example - ngForOf

<div ngFor let-user="$implicit" [ngForOf]="users" let-i="index">{{i}} - {{}} </div>

Introduction of Angular 2 Setup Angular 2 in .NET MVC Advantages of Angular 2
The Major Changes of Angular 2 Component Lifecycle Hooks Support of Modern Browsers
Angular 2 Vs. Angular 1 Angular 4 Vs. Angular 2 Constructors Vs. OnInit
Use of ngInit and ngOnInit ngOnInit() Vs. Constructors HTTP Cookies
Dependency Injection (DI) Inject() Vs. Injectable() Features and Benefits
Bindings in Angular 2Initialize an Array in Angular 2

I hope you are enjoying with this post! Please share with you friends. Thank you!!

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions