Created
October 16, 2015 18:01
-
-
Save seesharper/efdf444518bb971dd65c to your computer and use it in GitHub Desktop.
An Aurelia TreeView Custom Attribute Wrapper
This file contains 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
import {inject, customAttribute, bindable} from 'aurelia-framework'; | |
import 'jquery'; | |
import 'npm:[email protected]/dist/bootstrap-treeview.min.js'; | |
import {Test} from './treenode'; | |
@customAttribute('treeview') | |
@inject(Element) | |
export class TreeViewCustomAttribute { | |
element: Element; | |
constructor(element: Element) { | |
this.element = element; | |
} | |
attached() : void { | |
$(this.element).treeview({data:this.value}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment