What is the best way to integrate existing SQL database data to ionic/angularjs application?

Hello,

I’m fairly new to ionic. I have an existing web application and I am planning on making an app version of it. I have chosen ionic as the web application already uses Angularjs.

I already have existing tables in my database which I will connect to but I was wondering on what the best way to integrate it to my application?

An example is that I have a user table in my database and within that I have settings like user_type and admin_user. Sure I can use localstorage for client side processes but what about server side requests? I heavily use PHP $_SESSION variables in my application. Is there any way to integrate that to my application? From what I’ve read, you’re not able to use the session variables.

I thought of retrieving all of the settings when my application starts and saving them into localstorage but wouldn’t I need to pass the setting as a parameter on each occurrence of a $http.post or $http.get request? Is there a better way of doing this so that I can manage the user settings on the server side and have it persist page to page like a PHP session variable?

I would appreciate any advice on this subject.

Thanks