filmov
tv
AngularJS optional url parameters
Показать описание
angular optional route parameter
angular route param optional
angularjs optional route parameter
angularjs route optional parameters
angularjs routeparams optional
angular optional parameter
angular optional params
angular optional parameter example in c#
angular route params optional
AngularJS optional url parameters
In this video we will discuss angular optional URL parameters. Let us understand this with an example. Here is what we want to do.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
On the list of students page, we want to search employees by name.
For example if we type "Ma" and click search button, on the subsequent page we want to display all the student names that start with "Ma"
Here are the steps to achieve this.
[WebMethod]
public void GetStudentsByName(string name)
{
List[Student] listStudents = new List[Student]();
string cs = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
using (SqlConnection con = new SqlConnection(cs))
{
SqlCommand cmd = new SqlCommand("Select * from tblStudents where name like @name", con);
SqlParameter param = new SqlParameter()
{
Value = name + "%"
};
cmd.Parameters.Add(param);
con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Student student = new Student();
listStudents.Add(student);
}
}
JavaScriptSerializer js = new JavaScriptSerializer();
Context.Response.Write(js.Serialize(listStudents));
}
.controller("studentsController", function ($http, $route, $location) {
var vm = this;
else
}
}
.then(function (response) {
})
})
[h1]List of Students[/h1]
[ul]
[/a]
[/li]
[/ul]
.controller("studentsSearchController", function ($http, $routeParams) {
var vm = this;
$http({
method: "get",
}).then(function (response) {
})
}
else {
.then(function (response) {
})
}
})
.when("/studentsSearch/:name?", {
controller: "studentsSearchController",
controllerAs: "studentsSearchCtrl"
})
Link for all dot net and sql server video tutorial playlists
Link for slides, code samples and text version of the video
angular route param optional
angularjs optional route parameter
angularjs route optional parameters
angularjs routeparams optional
angular optional parameter
angular optional params
angular optional parameter example in c#
angular route params optional
AngularJS optional url parameters
In this video we will discuss angular optional URL parameters. Let us understand this with an example. Here is what we want to do.
Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.
On the list of students page, we want to search employees by name.
For example if we type "Ma" and click search button, on the subsequent page we want to display all the student names that start with "Ma"
Here are the steps to achieve this.
[WebMethod]
public void GetStudentsByName(string name)
{
List[Student] listStudents = new List[Student]();
string cs = ConfigurationManager.ConnectionStrings["DBCS"].ConnectionString;
using (SqlConnection con = new SqlConnection(cs))
{
SqlCommand cmd = new SqlCommand("Select * from tblStudents where name like @name", con);
SqlParameter param = new SqlParameter()
{
Value = name + "%"
};
cmd.Parameters.Add(param);
con.Open();
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
Student student = new Student();
listStudents.Add(student);
}
}
JavaScriptSerializer js = new JavaScriptSerializer();
Context.Response.Write(js.Serialize(listStudents));
}
.controller("studentsController", function ($http, $route, $location) {
var vm = this;
else
}
}
.then(function (response) {
})
})
[h1]List of Students[/h1]
[ul]
[/a]
[/li]
[/ul]
.controller("studentsSearchController", function ($http, $routeParams) {
var vm = this;
$http({
method: "get",
}).then(function (response) {
})
}
else {
.then(function (response) {
})
}
})
.when("/studentsSearch/:name?", {
controller: "studentsSearchController",
controllerAs: "studentsSearchCtrl"
})
Link for all dot net and sql server video tutorial playlists
Link for slides, code samples and text version of the video
Комментарии