added angularjs functionality