你的位置:首页 > 软件开发 > Java > angular.js学习-ng

angular.js学习-ng

发布时间:2016-09-02 10:00:05
ng-grid是基于AngularJS和JQuery的富表格控件,由AngularUI Team领衔开发,到目前为止已有2354次Commit,1076个Fork。 AngualrUI:http://angular-ui.github.io/ng-grid: http://a ...

angular.js学习-ng

ng-grid是基于AngularJS和JQuery的富表格控件,由AngularUI Team领衔开发,到目前为止已有2354次Commit,1076个Fork。 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>ng-index</title> <!-- Basic References: JQuery/AngualrJS --> <script type="text/javascript" src='/images/loading.gif' data-original="http://cdn.bootcss.com/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript" src='/images/loading.gif' data-original="http://cdn.bootcss.com/angular.js/1.3.8/angular.min.js"></script> <!-- ng-grid --> <link rel="stylesheet" href="http://cdn.bootcss.com/ng-grid/2.0.11/ng-grid.min.css"/> <script src='/images/loading.gif' data-original="http://cdn.bootcss.com/ng-grid/2.0.11/ng-grid.min.js"></script> <!--local: ng-index.html --> <script src='/images/loading.gif' data-original="js/ng-index.js"></script> <link rel="stylesheet" href="css/ng-index.css"/> </head> <body ng-app="indexApp"> <div id="container" ng-controller="gridCtrl"> <div ng-grid="gridOptions" /> </div> </body> </html>.gridStyle { height:300px; }var indexApp = angular.module('indexApp', ['ngGrid']); indexApp.controller('gridCtrl', function($scope) { $scope.members = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; $scope.gridOptions = { data: 'members' }; });var indexApp = angular.module('indexApp', ['ngGrid']); indexApp.controller('gridCtrl', function($scope) { $scope.members = [{name: "Moroni", age: 50}, {name: "Tiancum", age: 43}, {name: "Jacob", age: 27}, {name: "Nephi", age: 29}, {name: "Enos", age: 34}]; $scope.gridOptions = { data: 'members', columnDefs: [{field: 'name', displayName: '姓名'}, {field:'age', displayName:'年龄'}] }; });

原标题:angular.js学习-ng

关键词:JS

JS
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。