需要的文件:

  • 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. Mac python Tesseract 验证码识别

    Tesseract 简介 Tesseract(/'tesərækt/) 这个词的意思是"超立方体",指的是几何学里的四维标准方体,又称"正八胞体".不过这里要讲 ...

  2. HAL无阻塞延时

    //实现间隔time_interval时间点亮红灯(此时间间隔并不是绝对的,是大于等于的关系)//用于系统要求无延时且延时时间粗略的场合,比如间隔一段时间采样数据,间隔一段时间点亮状态灯等//HAL_ ...

  3. 通过wifi 连接 adb 到 手机

    网上很多文章都需要先用 usb 线连接先做一下设置,然后才能通过下面的方法连接 julian@julian-ThinkPad-T450:~/tools/android_sdk/platform-too ...

  4. socket 发送图片

    using System;using System.Collections.Generic;using System.Text;using System.Net.Sockets;using Syste ...

  5. C#获取网页的HTML码、下载网站图片

    1.根据URL请求获取页面HTML代码 /// <summary> /// 获取网页的HTML码 /// </summary> /// <param name=" ...

  6. EventBus 3.0使用相关

    一 引入方法 可以去github的官网中下载EventBus的相关资源  地址:https://github.com/greenrobot/EventBus 当然还有他的官方网站 http://gre ...

  7. Rest_framework 和路由配置(一)

    简介 Django REST framework是一个建立在Django基础之上的Web 应用开发框架,可以快速的开发REST API接口应用. Rest_framework 核心思想: 缩减代码. ...

  8. climbing stairs leetcode java

    问题描述: You are climbing a stair case. It takes n steps to reach to the top. Each time you can either ...

  9. getopt实现传参自动识别

    test.py #!/usr/bin/env python # -*- coding: utf-8 -*- import getopt import sys #-h-f-v为了下面的识别 opts,a ...

  10. Redis+Twemproxy+HAProxy集群(转) 干货

    原文地址:Redis+Twemproxy+HAProxy集群  干货 Redis主从模式 Redis数据库与传统数据库属于并行关系,也就是说传统的关系型数据库保存的是结构化数据,而Redis保存的是一 ...