angularJS cookie read response value

前端 未结 2 1954
一个人的身影
一个人的身影 2021-01-06 06:38

if i made a request on my server with $http i the the followig response:

Request URL:http://www.test.tst/login
Request Method:GET
Status Code:200 OK
Request          


        
2条回答
  •  花落未央
    2021-01-06 07:09

    You can use ngCookies. In order to do it, you need to include the angular-cookies.js and the ngCookie in your module.

    Then you can inject $cookies and get the cookie via its get function

    
    
                                     
                  
提交回复
热议问题