AngularJS Caching a REST request

前端 未结 2 443
迷失自我
迷失自我 2021-01-03 00:48

I\'m new to angularJS and have a question about caching etc.

I have a wizard with two steps, I want to be able to click back and next and have the forms still filled

2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-03 01:16

    if you replace $resource with $http then you can directly use below code

    $http({
        method: 'PUT',
        url: 'url',
        cache:true
    });
    

提交回复
热议问题