Applied angular.equals api to few controllers