Added directive to manage infinite scroll