I have website with SQL Server database, and now I want to create ionic mobile app using same database. Can anyone guide me how to connect Ionic app with SQL Server?
1 Answer
First of all you need to create a connection that you Ionic App can communicate with your Website.
That is Called an API. If we dont use any big tech Words to explain this. The Common practice is build a REST-API first.
Its a Link, and when you goto the link, the link will give you data in a Format JSON or XML. So your App can Parse the JSON/XML Data and display in your Ionic App.
Example.
www.yourwebsite.com/getusers
www.yourwebsite.com/adduser
you will call the first link from your App in GET protocol and this will give u a list of users in JSON Format.
you will call the second link from your App in POST protocol with User Parameters and this will add a user and Will give you Success or Error Json/XML Response.
So first you need to learn a bit about REST-API and how to build them. You can build them in any language.
Then plan which language is the best for you and follow up a good tutorial.
And Finally follow this on how to call an API from IONIC CALL API FROM IONIC