Reimplemented the functionalities using Angularjs