How to make variables persistent in angular?

I have a problem. So, I’m creating an angular application that a user need to be validated, approved by someone and has a role. Basically I have 3 variables: isApproved, role and isValidated. Also I have a JWT token for authentication and authorization. How should I make these 3 variables persistant? I want to diplay users different pages if they are validated, or if they are only approved, or if they have only a specific role and they are validated, but not approved, and so on.
I’m thinking of storing them in local storage, but the user can change the values there. Another way that I think is that everytime a user refresh the page, to call an API that give me these 3 variables from the backend, but I don’t know if this is a good way to do that. Or is there any way of getting the values from token? Like using claims or something, and decoding the token on the client side to get the values?
Please help me if you can. Thanks and have a good day! 🙂

Angular ngOnInit javascript errrors when i load page, but the page works as intended

I have a page in angular and in ngOnInit function i load my data. The data loads correctly and it is shown on page, everything seems to work, the only problem is in console i get a lot of javascript errors cannot read property ‘propertyName’. Any help of how i can get rid of those errors would be appresiated.

Database query filtering in ASP.Net core web api

I am creating a web API in ASP.net core for my angular frontend and right now I have implemented a filtering feature on my frontend page where the users can filter and sort the data using any field, with regex filters, and also allow the user to only show a number of elements on each page. the problem with this is that: every time I have to send all the data from my backend which won’t come in handy when I have a big database, so I must do the filtering, ordering, and paging on my backend depending on what the user requested from the front.
How’s this problem usually solved? are there known technics for doing this?