Page 1 of 1

Passing localstorage value to a DB read service from a DB

Posted: Mon May 05, 2014 8:09 am
by Aldrich Barcenas

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.

Image

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?

Image

I do not think this is working.

Just to add, I am invoking the service in load.

Image

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.


Passing localstorage value to a DB read service from a DB

Posted: Mon May 05, 2014 8:59 am
by Evgene Karachevtsev

Hello Aldrich,

You should add return statement: http://docs.appery.io/documentation/r...
return readObjectId;


Passing localstorage value to a DB read service from a DB

Posted: Mon May 05, 2014 9:31 am
by Aldrich Barcenas

It works! Thanks.