AngularJS Database
As we know ANgularJS is perfect to display data and it should also be from database like SQL,MySQl or another source but data should be in JSON format. Below i have provide some example to fetch data from different data source.
Here first example is fetch data from PHP server which have MySQL data
ASP.NET with .aspx Page
I have provide connectivity with below 4 pages
(1)Using PHP and MySQL. Returning JSON.
(2)Using PHP and MS Access. Returning JSON.
(3)Using ASP.NET, VB, and MS Access. Returning JSON.
(4)Using ASP.NET, Razor, and SQL Lite. Returning JSON.
Now we try Cross-Site HTTP Requests here with some examples. When a request for data from diferent server is happen which is other than the requesting page that is called Cross-site http requests. Cross-site are very common in web and most of the sites are using this. Let suppose generaly we use pages load CSS, images and scripts from different servers.
But in modern web cross-site http request from scripts are restricted to same site for some security issues. Below is the line which is used when we added to allow cross-site access.
header("Access-Control-Allow-Origin: *");
Below is the example to fetch records from MySQL with PHP
(1)Server code for PHP and MySQL
(2)Server code PHP with MS Access
(3)Server Code for vb.net with MSAccess (ASP.NET)
(4)Server Code for Razor C# and SQL Lite
| |