0

I am new to Angular. I wanted to know the difference between NgFor and NgForOf. The site says NgFor is deprecated and suggest to use NgForOf, can I continue using the former or should I change them to later. Thanks in advance.

EDIT

Please note that I have also asked about using it against deprecation or not. Also my question is regarding angular4not angular2

Shailey
  • 25
  • 1
  • 6

1 Answers1

0

snorkpete wrote here:

ngFor and ngForOf are not two distinct things - they are actually the selectors of the NgForOf directive.

Also there for ngFor Class detail is any type, i.e ngForOf : any whereas ngForOf has a class definiton as follows ngForOf : NgIterable<T>

David Walschots
  • 12,279
  • 5
  • 36
  • 59
Anup Kumar Gupta
  • 361
  • 5
  • 14
  • Thanks that helps. Please explain, should I use it or not ? – Shailey Jul 15 '17 at 20:56
  • Found a similar discussion here:[Is it wrong to use Deprecated methods or classes in Java?](https://stackoverflow.com/a/2941912/8313343). You may read this and get an idea. – Anup Kumar Gupta Jul 15 '17 at 20:58