$http get works only one time.. why?


#1

Hello, sorry i am really newbie, but i created a very well mobile app. Now finalizing but there are some bugs that I couldn’t solve…

I am making an $http get request to an PHP api and it works very well. Everything is okay. But if I go back to homepage again and if I try to send $http get request again, nothing happend… What causes such kind of thing?


#2

check your network tab whether the get call is been made and see the response


#3

Check if history is enabled. So when the state is get change and previously visited state is revisited the controller function is not re executed. Disable history saving and try


#4

sorry my mistake i have not read the post properly … use cache: false in your router if you want your view controller to be not cached and execute again.

$stateProvider.state(‘myState’, { cache: false, url : ‘/myUrl’, templateUrl …}.


#5

thank you very much for your help!