Logout button - include js.cookie.js script
tstavinoha opened this issue · comments
tstavinoha commented
js-cookie needs to be imported in head tag before it can be used.
<head>
....
<script type="text/javascript" src="/webjars/js-cookie/js.cookie.js"></script>
</head>
Otherwise, the following error shows up in the developer console:
at Object.beforeSend (http://localhost:8080/:41:25)
at Function.ajax (http://localhost:8080/webjars/jquery/jquery.min.js:4:10323)
at Function.n.(anonymous function) [as post] (http://localhost:8080/webjars/jquery/jquery.min.js:4:11574)
at logout (http://localhost:8080/:54:11)
at HTMLButtonElement.onclick (http://localhost:8080/#_=_:26:64)
Dave Syer commented
Works for me (it's already included at line 27:
).tstavinoha commented
Yeah, I've seen it a bit later. I created a PR to just put this step in the tutorial documentation, because all the other changes were explicitly listed and guide was smooth until that point.