public partial class WebForm1 : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } [WebMethod] public static List<Student> GetStudent() { List<Student> lstStudents = new List<Student>()
var app = angular.module('app', ['ngResource']); app.controller('studentsCtrl', function ($scope, student) { $scope.student = student; }); app.value('pageMethods', PageMethods); app.factory('student', function (pageMethods, $rootScope) { var result = []; pageMethods.GetStudent(function (data) { data.forEach(function (item) { result.push({ id: item.id, name: item.name}); }); $rootScope.$apply(); }); return result; })
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)