Skip to content

Instantly share code, notes, and snippets.

@seesharper
Created October 16, 2015 18:01
Show Gist options
  • Save seesharper/efdf444518bb971dd65c to your computer and use it in GitHub Desktop.
Save seesharper/efdf444518bb971dd65c 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