History Cache

21 views
Skip to first unread message

Sathish Thangathurai

unread,
Aug 4, 2015, 1:52:25 AM8/4/15
to AngularJS
Hi All,

I've been using ui-router module for my convenience also using hashbang mode.

Now my problem was when I click the browser back button the controller for the partial page have been loading and again fetching the data from server via rest API.

So what I'm expecting is,I don't want to call server rest API when i click the browser back button instead pick up from the cache.

Any help would be very helpful for me.Please give me any hints or tips.

Thanks
Sathish Thangathurai.

Emmanuel DEMEY

unread,
Aug 4, 2015, 4:11:02 AM8/4/15
to ang...@googlegroups.com
Hi,

Do you have the error Even with the {cache: true } property of any $http method ? 

Manu
@EmmanuelDemey

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.



--
Emmanuel DEMEY
Consultant

Sathish Thangathurai

unread,
Aug 7, 2015, 3:54:55 AM8/7/15
to ang...@googlegroups.com
Hi,

No, There was no error even if i set property {cache = true}. The data are loading again when i was click the back button.

I did little tricky, I've stored the data in the factory and pop up that data when the user click the back button (asked from angularjs freenode chat).

Thanks
Sathish Thangathuri

--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/AH6yhoBKrC8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.

Sathish Thangathurai

unread,
Aug 7, 2015, 4:01:03 AM8/7/15
to ang...@googlegroups.com
Hi,

Sorry EmmanuelDemey, Still now I didn't use the cache property in the $http service.Will check and update to you later

Even in the mean time I was following the angularjs free node chat for technical review.

I'm not sure about the cache property used in the $http service because it seems don't work for second time call (it pick from the cache).

lets see that your suggestion will make sense.

Thanks
Sathish Thangathurai.

Sathish Thangathurai

unread,
Aug 8, 2015, 12:52:24 AM8/8/15
to ang...@googlegroups.com
Hi,

Yes Emmanual. your right the cache property made sense.

Thanks
Sathish Thangathurai.
Reply all
Reply to author
Forward
0 new messages