-
-
Save oneillci/bb31085c8ad61addb67e527ce7898d28 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:bootstrap-treeview@1.2.0/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