I find there are some problems in the project during I used it in my project. I fixed 4 problems listed as below:
- Fix the
<a> tag do not work problem. Before I fix this, all the links in the project are not working.
- Delete the cookie when logout. Before I fix this, after you log out, refresh the page, the status will be loggin again.
- Save the cookie on the base uri. Before I fix this, it's working fine in this project. But if you use the same code in other project, then it will not work.
- Deleted useless if sentense. the if sentense always return true.
- How did I implement them
Link to relevant lines in the code on GitHub and explain briefly what you added/changed.
- Item 1: added two options to the
config method of the module: requireBase: true, and rewriteLinks: false.
- Item 2: add
ipCookie.remove('st_access_token', {path:'/'}); to the function $scope.logout.
- Item 3: changed the
$scope.logout and the controller of SetCookies.
- Item 4: delete the first if function in app.js.
Posted on Utopian.io - Rewarding Open Source Contributors