I have a problem with $http post in Angularjs. Any one can help on how to avoid duplicated requests... Here is my code in controller
var myApp = angular.module("myApp", ['ngRoute', 'pascalprecht.translate']);
myApp.controller('mainController', function ($scope, $translate, $location, $rootScope, $http, $filter, $interval) {
var myInit = function () {
$http.post("API_V1/api.asmx/fetchALLRate", { data: {} })
.success(function (data, status, headers, config) {
this.objRate = $.parseJSON(data.d);
});
};
angular.element(document).ready(myInit);
And here is image for duplicate request error
http://i.stack.imgur.com/5fEyy.png[^]
Thank you in advance.. hope that anyone could help me out...btw, sorry for my bad english.