In this post I am going to explain how to get list of all products or you can say product collection in magento 2. 1. Using Dependency Injection Add below code snippet in Block class.

Add below code snippet in template file.

  2. Using Object Manager

  Team HiddenTechiesWrite an article…