I'm trying to create a mobile application using AngularJS and Ionic Framework. However, I'm lost when trying to find a solution for backend database support. Is there a plugin or third-party API available to use to accomplish this?
1 Answer
Client side web applications do not connect directly to SQL database servers.
You need to pick a server side programming language and write a web service interface to your database.
Then access that interface using XMLHttpRequest (which Angular wraps with $http).
4 Comments
Arnold Daniels
Jess Patton
node.js is awesome! we run our company app with a backend node server that runs in IIS and connects to sql database.
Dezmen Ceo Sykes
I was thinking of creating an API in php but im not sure how the data would be sent back to a angularjs controller,. Im familiar with the $http.post('script.php' etc etc) setup to send data and execute however i cant seem to retrieve the information back for things like SELECT queries.
Quentin
@DezmenCeoSykes —
<?php echo $somedata; ?>