Created
November 17, 2015 11:45
-
-
Save Insayt/ca7a299792d4c492082e to your computer and use it in GitHub Desktop.
Service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('$dataApi', function($http, $Api) { | |
return { | |
getCountries: function() { | |
return $http.get(appConfig.apiBase + 'country/index'); | |
}, | |
getStates: function(countryId) { | |
return $Api.get(appConfig.apiBase + 'state/index/?country=' + countryId); | |
}, | |
getTimezones: function() { | |
return $http.get(appConfig.apiBase + 'timezone/index'); | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment