GithubHelp home page GithubHelp logo

dolymood / angular-tree-repeat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stackfull/angular-tree-repeat

0.0 3.0 0.0 130 KB

Recursive repeater for angular.js

License: MIT License

JavaScript 82.24% HTML 17.11% CSS 0.65%

angular-tree-repeat's Introduction

angular-tree-repeat

Source for the sf.treeRepeat module for AngularJS

About

Adds a pair of directives that can be used to display recursive (tree) data.

See http://blog.stackfull.com/2014/02/trees-in-angularjs/ for the back story.

Usage

Whether you build the component, copy the raw source or use bower (see below), the end result should be included in your page and the module sf.treeRepeat included as a dependency:

angular.module('myModule', ['sf.treeRepeat']);

Then use the directive sf-treepeat and sf-treecurse as follows:

<ul>
  <li sf-treepeat="node in children of treeData">
    {{node.name}}
    <ul>
      <li sf-treecurse></li>
    </ul>
  </li>
</ul>

Check out the examples in the demo folder for all the details.

Developing

Grunt is used as the build tool, so you will need node and npm installed. Since v0.4, grunt has 2 parts: the heavy lifting package grunt and the shell command grunt-cli. If you haven't already installed grunt-cli globally, do so now with:

sudo npm install -g grunt-cli

To run the simple demo, install the npm dependencies for the build tools and go:

npm install
grunt demo

You can now view the demo at http://localhost:8000/

Build with grunt dist and choose a file from the dist directory.

Using the component

For use with bower, there is a separate repo containing just the built artifacts here: angular-tree-repeat-bower. You can add the component to your project with:

bower install angular-tree-repeat

Or by adding a line to your component.json file.

If you are using grunt for your build, consider using a plugin like bowerful.

All comments to [email protected]

ChangeLog

0.0.0 (09 Feb 2014)

Prototype

angular-tree-repeat's People

Contributors

stackfull avatar

Watchers

 avatar  avatar  avatar

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.