Navaneethan C
Navaneethan C

Reputation: 21

Without localstorage how we can store the value

Without local storage, I want to store my value. because the value can be visible in the developer tool for local storage. There is a way to store a value in storage that can't be seen in the developer tool. Please guide me

Thanks

Upvotes: 0

Views: 1579

Answers (2)

Denuka
Denuka

Reputation: 1242

RxJS powered state management for Angular applications, inspired by Redux. @ngrx/store is a controlled state container designed to help write performant, consistent applications on top of Angular.

Better to follow given link for more information. ngrx/store

Here is a good blog to go through to learn further.

Upvotes: 1

balajivaishnav
balajivaishnav

Reputation: 2893

you can use JWT encode to encode the data in API and set it to local storage, from angular you can use this.jwtHelper.decodeToken(responsedata) to decode the data,using this technique you can hide the data visibility in local storage, you can also use cookie to store the data

install ngx-cookie-service from npm

create a object for cookie service

private cookieService: CookieService

Set data

this.cookieService.set( 'Test', 'Hello World' )

Upvotes: 0

Related Questions