I am experienced in ASP.NET and web/database applications; I am learning and trying out Angular. I found a very good database example at w3schools.com, here:
http://www.w3schools.com/angular/angular_sql.asp
(see sections "Fetching Data From an ASP.NET Server Running SQL" and "4. Server Code ASP.NET, VB Razor and SQL Lite").
The Angular code is just:
$http.get("http://www.w3schools.com/angular/customers_sql.aspx")
and the sample query in the aspx page is:
"SELECT CompanyName, City, Country FROM Customers"
My problem is, there is no explanation of how to pass parameters to a query similar to this:
"SELECT CompanyName, City, Country FROM Customers Where Country = " & txtSomething
I know how to change the aspx page to read parameters on the ASP.NET side, but I don't know how to pass them from the Angular code.
How should I modify this Angular code to pass parameters to the aspx page?
var app = angular.module('myApp', []);
app.controller('customersCtrl', function($scope, $http) {
$http.get("http://www.w3schools.com/angular/customers_sql.aspx")
.success(function (response) {$scope.names = response.records;});
});
Thank you.