Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save oneillci/bb31085c8ad61addb67e527ce7898d28 to your computer and use it in GitHub Desktop.
Save oneillci/bb31085c8ad61addb67e527ce7898d28 to your computer and use it in GitHub Desktop.
An Aurelia TreeView Custom Attribute Wrapper
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