Jigar Tarsariya Jigar Tarsariya - 2 years ago 94
Swift Question

Good starting point for calling api in ionic framework

I am new in ionic framework so i don't have much idea. I want to know that how do i call api using ionic in my app? please anybody have any idea then suggest me.

Ved Ved
Answer Source

Integrating a API Service with AngularJS in Ionic

 angular.module('ionicApp', [])

 .controller('MainCtrl', function($scope, $http) {
      $http.get('https://cors-test.appspot.com/test').then(function(resp) {
         console.log('Success', resp);
          // For JSON responses, resp.data contains the result
       }, function(err) {
         console.error('ERR', err);
         // err.status will contain the status code


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download