Created
January 11, 2015 03:40
-
-
Save jtrussell/5bc9adea6ee511e8eb3b to your computer and use it in GitHub Desktop.
jsbin - Angular IVH Treeview template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JS Bin</title> | |
| <link rel="stylesheet" href="//rawgit.com/iVantage/angular-ivh-treeview/master/dist/ivh-treeview.css"> | |
| <link rel="stylesheet" href="//rawgit.com/iVantage/angular-ivh-treeview/master/dist/ivh-treeview-theme-basic.css"> | |
| </head> | |
| <body ng-app="bin"> | |
| <div ng-controller="DemoCtrl as demo"> | |
| <h3>Stuff</h3> | |
| <div ivh-treeview="demo.stuff"> | |
| </div> | |
| </div> | |
| <script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.8/angular.js"></script> | |
| <script src="//rawgit.com/iVantage/angular-ivh-treeview/master/dist/ivh-treeview.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var stuff = [{ | |
| label: 'Hats', | |
| children: [ | |
| {label: 'Flat cap'}, | |
| {label: 'Fedora'}, | |
| {label: 'Baseball'}, | |
| {label: 'Top hat'}, | |
| {label: 'Gatsby'} | |
| ] | |
| },{ | |
| label: 'Pens', | |
| selected: true, | |
| children: [ | |
| {label: 'Fountain'}, | |
| {label: 'Gel ink'}, | |
| {label: 'Roller ball'}, | |
| {label: 'Fiber tip'}, | |
| {label: 'Ballpoint'} | |
| ] | |
| },{ | |
| label: 'Whiskey', | |
| children: [ | |
| {label: 'Irish'}, | |
| {label: 'Scotch'}, | |
| {label: 'Rye'}, | |
| {label: 'Tennessee'}, | |
| {label: 'Bourbon'} | |
| ] | |
| }]; | |
| var app = angular.module('bin', ['ivh.treeview']); | |
| app.config(function(ivhTreeviewOptionsProvider) { | |
| ivhTreeviewOptionsProvider.set({ | |
| defaultSelectedState: false, | |
| validate: true | |
| }); | |
| }); | |
| app.controller('DemoCtrl', function() { | |
| this.stuff = stuff; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment