updated controller and view in angular