Change app's methods on angularjs for compress data