jaesung2061/anvel

Error 404, when I try to logout/delete token

Closed this issue · 1 comments

I try on my localhost (Windows 8.1, wamp) to logout by click button, but in concole I can see error 404:
https://i.imgur.com/meeizpu.png

My logout function in component.ts:

public logoutUser() {
        this.auth.logout().subscribe(
            () => {
                console.log("Logout success.");       
            },
            (error) => {
                this.error = true;
                console.error(error);
            });
    }

My logout function in component.html:
<button (click)="logoutUser()">Wyloguj</button>

What is the propper way to create component with content available only for logged in users with "Logout button"

Project was reworked. Issue no longer relevant.