Any idea how this can be implemented in angular 5.