Passing localstorage value to a DB read service from a DB
I had seen tutorials in search. But I would like to know how to pass the value of a localstorage item instead of what is stored in a component.
In the picture above, I have a service where it takes the _id (the unique id of the object in the db). How can I pass the value that is stored in the localstorage?
I do not think this is working.
Just to add, I am invoking the service in load.
The purpose of this is that I have a list and if you click one of the list, it will store the object id in local storage and load the next page. There the value stored in localstorage will be used to query the DB to fetch the object in the database.