GithubHelp home page GithubHelp logo

angri's Introduction

angri - Grid Directive for AngularJS

angri is modular grid directive for AngularJS, based on the components of Twitter Bootstrap. It is filterable, pagable, sizeable and sortable. The following lines will describe the features in detail.

Usage

Using angri is as easy as possible. Just add the following markup to your page, providing the list of data through your controller. The only tag you need is ng-grid in your table directive.

<table class="table table-bordered table-striped" ng-grid>    	
  <legend>Network List</legend>
    <tr ng-repeat="todo in todos">
 	  <td title="Name" name="name">{{todo.name}}</td>
      <td title="Estimate" name="estimate">{{todo.estimate}}</td>
      <td title="Created At" name="created at">{{todo.created_at}}</td>
  	  <td title="Updated At" name="upated at">{{todo.updated_at}}</td>
    </tr>		  
</table>

Customize table headers and sorting

As you can see in the markup, the <td></td> contains two elements. The first is title="titleName", which allows you to specify the contents of the <th></th> tag of a specific column. The second is name="sortName", enabling the sorting feature for a column. We split that up, as it might often be the case that the actual title will differ significantly from the property name in your JSON array. In the name="sortName" you are allowed to have whitespace, as they will be replaced automatically by an underscore for parsing.

Filter in your ng-repeat

You may apply any filter you like to your ng-repeat directive you like. It will be automatically wired through into angri and applied to your list.

Pagesize

angri provides a dropdown, which enables you to choose the number of items displayed in the table. The default list settings are: 10, 15, 30 and 60. If you would like to change the number of items displayed, you may change the line 24ff in the source. In a future release, we will support a way to modify the items list.

If you like to contribute a patch or enhancement, feel free!

Filter

Pagination

Sortable

License

Copyright 2012 Johannes Hiemer, Tobias Kopelke

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

angri's People

Contributors

jhiemer avatar lordnox avatar

Stargazers

Michael Robinson avatar Olivier Cuenot avatar Hans Roman avatar  avatar Frank Chen avatar Michael Caron avatar Tami Wright avatar Dinesh Kesarwani avatar Daniel Petersen avatar Jimmy Collazos avatar Justin Ryan avatar Michael Alan Dorman avatar Tharshan Muthulingam avatar Nick Presta avatar

Watchers

Tami Wright avatar Hannah Fouasnon avatar  avatar  avatar James Cloos avatar Ian Lim avatar  avatar

angri's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.