ng-table实例

时间:2021-01-04 16:24:27
【文件属性】:

文件名称:ng-table实例

文件大小:7KB

文件格式:ZIP

更新时间:2021-01-04 16:24:27

ng-table

(function() { "use strict"; var app = angular.module("myApp", ["ngTable", "ngTableDemos"]); app.controller("demoController", demoController); demoController.$inject = ["NgTableParams", "ngTableSimpleMediumList"]; function demoController(NgTableParams, simpleList) { this.tableParams = new NgTableParams({ filter: { surname: 'Ch' } }, { filterOptions: { filterLayout: "horizontal" }, dataset: simpleList }); this.nameFilterDef = { name: { id: "text", placeholder: "First name" }, surname: { id: "text", placeholder: "Surname" } }; } app.controller("dynamicDemoController", dynamicDemoController); dynamicDemoController.$inject = ["NgTableParams", "ngTableSimpleMediumList"]; function dynamicDemoController(NgTableParams, simpleList) { this.cols = [{ title: "Full Name", filter: { name: { id: "text", placeholder: "First name" }, surname: { id: "text", placeholder: "Surname" } }, show: true, valueExpr: 'item.name + " " + item.surname' }, { title: "Age", filter: { name: "number" }, show: true, valueExpr: 'item.age' }]; this.tableParams = new NgTableParams({ filter: { surname: 'Ch' } }, { filterOptions: { filterLayout: "horizontal" }, dataset: simpleList }); } })(); (function() { "use strict"; angular.module("myApp").run(setRunPhaseDefaults); setRunPhaseDefaults.$inject = ["ngTableDefaults"]; function setRunPhaseDefaults(ngTableDefaults) { ngTableDefaults.params.count = 5; ngTableDefaults.settings.counts = []; } })();


【文件预览】:
index.html
js
----nqjzro.js(13KB)
----index.js(2KB)
README.txt
css
----nqjzro.css(1KB)
license.txt

网友评论