var app = angular.module("myTodoApp",[]); myTodoCtrl.js: app.controller("myTodoCtrl",function($scope){ $scope.message=""; $scope.firstnames=[{"Name" : "Alfreds Futterkiste","City" : "Berlin","Country" : "Germany"},{"Name" : "Berglunds snabbköp","City" : "Luleå","Country" : "Sweden"},{"Name" : "Centro comercial Moctezuma","City" : "México D.F.","Country" : "Mexico"},{"Name" : "Ernst Handel","City" : "Graz","Country" : "Austria"},{"Name" : "FISSA Fabrica Inter. Salchichas S.A.","City" : "Madrid","Country" : "Spain"},{"Name" : "Galería del gastrónomo","City" : "Barcelona","Country" : "Spain"}]; $scope.twonames=[{"Name" : "Alfreds Futterkiste","City" : "Berlin","Country" : "Germany"},{"Name" : "Berglunds snabbköp","City" : "Luleå","Country" : "Sweden"},{"Name" : "Centro comercial Moctezuma","City" : "México D.F.","Country" : "Mexico"},{"Name" : "Ernst Handel","City" : "Graz","Country" : "Austria"},{"Name" : "FISSA Fabrica Inter. Salchichas S.A.","City" : "Madrid","Country" : "Spain"},{"Name" : "Galería del gastrónomo","City" : "Barcelona","Country" : "Spain"},{"Name" : "Island Trading","City" : "Cowes","Country" : "UK"},{"Name" : "Königlich Essen","City" : "Brandenburg","Country" : "Germany"},{"Name" : "Laughing Bacchus Wine Cellars","City" : "Vancouver","Country" : "Canada"},{"Name" : "Magazzini Alimentari Riuniti","City" : "Bergamo","Country" : "Italy"},{"Name" : "North/South","City" : "London","Country" : "UK"},{"Name" : "Paris spécialités","City" : "Paris","Country" : "France"},{"Name" : "Rattlesnake Canyon Grocery","City" : "Albuquerque","Country" : "USA"},{"Name" : "Simons bistro","City" : "København","Country" : "Denmark"},{"Name" : "The Big Cheese","City" : "Portland","Country" : "USA"},{"Name" : "Vaffeljernet","City" : "Århus","Country" : "Denmark"},{"Name" : "Wolski Zajazd","City" : "Warszawa","Country" : "Poland"}]; $scope.left=function(){ return 100- $scope.message.length;}; $scope.clear=function(){$scope.message="";}; $scope.save = function(){$scope.message="";};}); 基本效果就是这样,具体你自己调整一下吧. 我的笔记 var app = angular.module("myTodoApp",[]); myTodoCtrl.js: app.controller("myTodoCtrl",function($scope){ $scope.message=""; $scope.firstnames=[{"Name" : "Alfreds Futterkiste","City" : "Berlin","Country" : "Germany"},{"Name" : "Berglunds snabbköp","City" : "Luleå","Country" : "Sweden"},{"Name" : "Centro comercial Moctezuma","City" : "México D.F.","Country" : "Mexico"},{"Name" : "Ernst Handel","City" : "Graz","Country" : "Austria"},{"Name" : "FISSA Fabrica Inter. Salchichas S.A.","City" : "Madrid","Country" : "Spain"},{"Name" : "Galería del gastrónomo","City" : "Barcelona","Country" : "Spain"}]; $scope.twonames=[{"Name" : "Alfreds Futterkiste","City" : "Berlin","Country" : "Germany"},{"Name" : "Berglunds snabbköp","City" : "Luleå","Country" : "Sweden"},{"Name" : "Centro comercial Moctezuma","City" : "México D.F.","Country" : "Mexico"},{"Name" : "Ernst Handel","City" : "Graz","Country" : "Austria"},{"Name" : "FISSA Fabrica Inter. Salchichas S.A.","City" : "Madrid","Country" : "Spain"},{"Name" : "Galería del gastrónomo","City" : "Barcelona","Country" : "Spain"},{"Name" : "Island Trading","City" : "Cowes","Country" : "UK"},{"Name" : "Königlich Essen","City" : "Brandenburg","Country" : "Germany"},{"Name" : "Laughing Bacchus Wine Cellars","City" : "Vancouver","Country" : "Canada"},{"Name" : "Magazzini Alimentari Riuniti","City" : "Bergamo","Country" : "Italy"},{"Name" : "North/South","City" : "London","Country" : "UK"},{"Name" : "Paris spécialités","City" : "Paris","Country" : "France"},{"Name" : "Rattlesnake Canyon Grocery","City" : "Albuquerque","Country" : "USA"},{"Name" : "Simons bistro","City" : "København","Country" : "Denmark"},{"Name" : "The Big Cheese","City" : "Portland","Country" : "USA"},{"Name" : "Vaffeljernet","City" : "Århus","Country" : "Denmark"},{"Name" : "Wolski Zajazd","City" : "Warszawa","Country" : "Poland"}]; $scope.left=function(){ return 100- $scope.message.length;}; $scope.clear=function(){$scope.message="";}; $scope.save = function(){$scope.message="";};}); 基本效果就是这样,具体你自己调整一下吧. 非常感,我尝试用两个表格显示吧。
推荐阅读
-
如何解决《如何在phpcrawl中避免循环僵尸陷阱?》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《库依赖增加APK的大小?》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《从多个表中删除同一组值》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《Scrapy找不到蜘蛛》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《期货让我有些困惑,尝试过flatMap身份》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《如何返回到RootViewController》经验,为你挑选了2个好方法。 ...
[详细]
-
如何解决《获取两个位置之间的路线点》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《如果RxJavaobservable需要很长时间,你如何显示微调器?》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《如何在linux中删除虚拟接口?》经验,为你挑选了2个好方法。 ...
[详细]
-
如何解决《在double_scalars中遇到的除以零的导数计算》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《限制访问GitHub或Bitbucket存储库》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《@ViewChild和@ContentChild有什么区别?》经验,为你挑选了3个好方法。 ...
[详细]
-
如何解决《如何在Swift(iOS,Xcode)中将NSDictionary转换为JsonString?》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《代理存储库被阻止》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《如何在XML中实现OnTouch侦听器》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《LocalAllocVsGlobalAllocVsmallocVsnew》经验,为你挑选了2个好方法。 ...
[详细]
-
如何解决《什么是Clojure相当于Scala的maxBy函数?》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《是否可以使用EF7执行自定义SQL查询》经验,为你挑选了1个好方法。 ...
[详细]
-
如何解决《Imageview中的并行动画》经验,为你挑选了0个好方法。 ...
[详细]
-
如何解决《如何使用SpringBoot和LiquibaseChangesetYaml文件访问系统属性》经验,为你挑选了1个好方法。 ...
[详细]
mylvfamily
这个屌丝很懒,什么也没留下!
| |