angular

http://www.iteye.com/news/28651-AngularJS-Google-resource

http://blog.csdn.net/yy374864125/article/details/41349417

http://download.csdn.net/detail/hcl1687/4908324

http://blog.csdn.net/binyao02123202/article/details/9279951

http://www.cnblogs.com/liuju150/p/4631463.html






Angular






List Orders

查询条件

No:

Total:
























ID No Total Date Action
{{item.Id}} {{item.No}} {{item.Total}} {{item.Date | date : 'yyyy-MM-dd'}} Edit Delete







Add Order

No:

Total:

Date:





Update Order


No:

Total:

Date:









1)首先是html页面的编写:






学生信息管理

//需要用到的一些库,要加载的











学生信息列表





搜索: //加上实现了表格内容的检索。




//遍历每一个对象






{{student.Name}}


{{student.Id}}


{{student.Grade}}


Edit
Save
Delete












(2)JS代码部分:

var myModule=angular.module('myModule',['ngTable']).
controller('FormController',function($scope,ngTableParams,$sce){
$scope.students=[
{Name:'小李',Id:'201401201',Grade:'计算机技术'},
{Name:'李磊',Id:'201401202',Grade:'计算机技术'},
{Name:'夏津',Id:'201401203',Grade:'计算机技术'},
{Name:'杭州',Id:'201401204',Grade:'计算机技术'}
];
$scope.addStudent=function(){ //添加学生函数
$scope.students.push({Name:$scope.newName,Id:$scope.newId,Grade:$scope.newGrade});
$scope.newName='';
$scope.newId='';
$scope.newGrade='';
};
$scope.deleteStudent=function(student){ //删除一行的内容
$scope.students.splice($scope.students.indexOf(student),1);
};
});

(3)测试发现上面的方法删除的都是最后一行的内容,接下来改动一点使得可以删除选定行,并且对其加以序列号:

  deleteStudent()函数:

  $scope.deleteStudent=function(index){ //删除选中的一行
$scope.students.splice(index,1);
};

在HTML页面中也需要改动一点:Delete

即在deleteStudent()中传入当前行的索引index。


http://damoqiongqiu.iteye.com/blog/1920993
http://www.angularjs.cn/A175
http://www.grobmeier.de/angular-js-ng-select-and-ng-options-21112012.html
http://ask.csdn.net/questions/171441
http://www.oschina.net/news/60230/angularjs-2-0-website
https://angular.io/download/

你可能感兴趣的:(angular,angular)