0 Dejan Marolt · March 13, 2015
Hello guys,

I need some help on understanding AngularJS in connection with MySQL database. I have made simple MySQL database (only 1 table and 1 entry). I would like somehow retrieve data from database but using AngularJS. 

So if there is one out there, that could explain this I would really appreciate. 

Thanks for your help :)

Post a Reply


Oldest  Newest  Rating
0 Samuel Oloruntoba · March 13, 2015
you create a restful api that angular ajaxes to
0 Vimal Menon · March 15, 2015
$http is good module to use to connect to restful service but for that you need to have backend like NodeJs or something. 
+2 Nikola Novakovic · March 15, 2015
Hey Dejan!

My guess is that you are just starting out with AngularJS right ? 

As two people above said you can not just "connect" to mysql database as you would in PHP for example. What you can do tough is create an API endpoint with Rails or PHP or C# or Node.js or whatever backend language you prefer and have something called an $http service hit those endpoints and that is how you would interact with the database aka doing CRUD ( create, read , update, delete ).

Now if any of these things did not make sense in the previous paragraph I would urge you to actually go and do a few AngularJS tutorials and to learn a few basic principles about how API's work, what is a Restful API, how to create one etc. And it will make much more sense then. 

Some useful links to get started as far as Angular goes:
  • 1

Other Programming Languages


I think it is pretty obvious what this section is for.

Bucky Roberts Administrator