需要的文件:

  • angular.js
  • ng-table.js
  • ng-table.css
  • bootrasp.css

注入依赖:

 var app = angular.module('app', [
'ngTable',
'ui.bootstrap',
]);

为ng-table设置数据

app.controller('controller', function($scope,NgTableParams) {
$http.get("/query")
.success(function(data) {
$scope.userTable = new NgTableParams({
page : ,
count :
}, {
total : data.length,
getData : data
}
});
})
});
}

为 table 添加 ng-table 属性

<table ng-table="userTable" class="table table-hover">
<tbody>
<tr>
<th>编号</th>
<th>用户名</th>
</tr>
<tr ng-repeat="user in $data">
<td>{{user.id}}</td>
<td>{{user.name}}</td>
</tr>
</tbody>
</table>

ng-table的更多相关文章

  1. ocp 1Z0-043 61-130题解析

    61. You are working in an online transaction processing (OLTP) environment. You realize that the sal ...

  2. 25个超有用的 AngularJS Web 开发工具

    AngularJS是为了克服HTML在构建应用上的不足而设计的.HTML是一门很好的为静态文本展示设计的声明式语言,改善了JavaScript. 下面我要说的就是25个超有用的AngularJS工具, ...

  3. table sorting–angularjs

    1: <script type="text/javascript" ng:autobind 2: src="http://code.angularjs.org/0. ...

  4. [Ng]Angular应用点概览

      1. 使用模块化写法. var app = angular.module('myApp', []); app.controller('TextController', function($scop ...

  5. Magento Table Rate运费国家代码汇总

    Magento Table Rate是三种内置未调用第三方API运费方式中最强大的一个.通过设置国家,区域,邮编,价格来划分不同的运费等级.该方式基本能够满足轻量级的B2C商城的运费模式.这里收集下国 ...

  6. iphone dev 入门实例1:Use Storyboards to Build Table View

    http://www.appcoda.com/use-storyboards-to-build-navigation-controller-and-table-view/ Creating Navig ...

  7. PLSQL_性能优化系列09_Oracle Partition Table数据分区表

    2014-08-22 Created By BaoXinjian

  8. java +bootstrap table 完整例子

    需求:现在常用的table 插件很多, 比如 jquey datatables ,不过操作挺 麻烦, 看到推荐的bootstrap 自带的 table,就用到项目来,先看效果:

  9. ABP+AdminLTE+Bootstrap Table权限管理系统第九节--AdminLTE模板页搭建

    AdminLTE 官网地址:https://adminlte.io/themes/AdminLTE/index2.html 首先去官网下载包下来,然后引入项目. 然后我们在web层添加区域Admin以 ...

  10. Angular: 执行ng lint后如何快速修改错误

    当我第一次被分配到“修正执行ng lint语句后的错误”这项任务前,我就被导师提前告知这是一个很无聊的任务,当我开始后,我发现其实有一些办法可以加快这个无聊单调的工作.接下来,我就分享一下我的经验. ...

随机推荐

  1. 编写脚本,出现 TypeError: exceptions must be old-style classes or derived from BaseException, not unicode怎样解决?

    小编使用robot framework,在编写安卓自动化脚本时,出现这样的情况: 在网上搜了好久,发现都是python的解决方法,到底怎样解决robot里面的问题呢?最终发现: (1)代码中我是这样写 ...

  2. English trip V1 - B 23. Nosy People 爱管闲事的人 Teacher:Parice Key: Be + Ving

    In this lesson you will learn to talk about what happened.  谈论发生什么? 课上内容(Lesson) Nosy  好管闲事Noise  噪声 ...

  3. webService上传图片

    webService /// <summary> /// 上传图片webServer 的摘要说明 /// </summary> [WebService(Namespace = ...

  4. TP5中的小知识

    在TP5中如果想用select 查询后,变成数组,用toArray()这个函数的话,必须在连接数据库中把 数据集返回类型变成 'resultset_type'=>'\think\Collecti ...

  5. python3 mail

    # !usr/bin/python3# -*-coding=UTF-8-*-import smtplib # python 对SMTP的支持,smtplib这个库负责发送邮件from email.mi ...

  6. win10更新后,可以远程桌面ping也没问题,但是无法访问共享文件夹的解决方法

    计算机\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters 1.在键盘输入WIN+R键, ...

  7. 第一阶段——站立会议总结DAY04

    1.昨天做了什么:未取得一点进步. 2.今天准备做什么:准备在网上搜索一下微信个人中心的相关信息,代码资料. 3.遇到的困难:界面简陋,还是对于深层次的,比如逻辑,还是不怎么会用.

  8. ACM基础(一)

    比较大的数组应尽量声明在main函数外,否则程序可能无法运行. C语言的数组并不是“一等公民”,而是“受歧视”的.例如,数组不能够进行赋值操作: 在程序3-1中,如果声明的是“int a[maxn], ...

  9. oracle 基本操作--事务

    事务:可以看做是由对数据可的若干操作组成的一个单元,浙西操作要么都完成,要么都取消,从而保证数据满足一致性的要求. 事务的组成: 一条或者多条DML 一条DDL 一条DCL DML语句需要使用comm ...

  10. python-flask-wtforms组件流程源码

    在最开始要弄明白一点,类都是由元类创建的.在定义类 class Foo:pass的时候(类也是对象),就会执行type类或者type派生类的__init__方法,当Foo()时:执行type类或者ty ...