reproduced functionality in angular