I'm setting up angular application inside a wordpress theme. Some Angular elements should check if a user is logged in and have a specific role to show some content. Wordpress is a PHP cms system and Angular is based on typescript. How to archive this.
What I am able to do is.
console.log(document.body.classList.contains( 'logged-in' ));
But it seems very unsafe and its just the login status and has no user role check.