ng-grid是基於AngularJS和JQuery的富表格控制項,由AngularUI Team領銜開發,到目前為止已有2354次Commit,1076個Fork。 AngualrUI:http://angular-ui.github.io/ ng-grid: http://angular-ui.g ...
ng-grid是基於AngularJS和JQuery的富表格控制項,由AngularUI Team領銜開發,到目前為止已有2354次Commit,1076個Fork。 AngualrUI:http://angular-ui.github.io/ ng-grid: http://angular-ui.github.io/ng-grid/ ng-grid(code on Github): https://github.com/angular-ui/ng-grid 入手(官網參照) 1.創建HTML頁面和與之相對應的JS,CSS文件 ng-index.html js/ng-index.js css/ng-index.css 2.在ng-index.html中添加ng-grid所依賴的JQuery和AngularJS框架。 下載到本地: JQuery:http://code.jquery.com/ Angularjs:https://angularjs.org/ 線上(進入後選擇適合版本): JQuery:http://www.bootcdn.cn/jquery/ Angularjs:http://www.bootcdn.cn/angular.js/ 3.引入ng-grid的JS和CSS文件 下載到本地: http://angular-ui.github.io/ng-grid/ 線上:http://www.bootcdn.cn/ng-grid/ 4.在ng-index.html中添加如下標簽。 <div class="gridStyle" ng-grid="gridOptions" /> ・gridStyle: 表格的Style控制,寫入ng-index.css中 ・gridOptions: ng-index.js中表格所在的Controller的$scope調用賦值(AngularJS數據綁定)