jqwidgets-scripts-custom
Version:
jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.
24 lines (19 loc) • 946 B
text/typescript
import { Component, ViewChild } from '@angular/core';
import { jqxTreeComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxtree';
import { jqxDropDownButtonComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxdropdownbutton';
({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
('myTree') myTree: jqxTreeComponent;
('myDropDownButton') myDropDownButton: jqxDropDownButtonComponent;
myTreeOnInitialized(): void {
this.myDropDownButton.setContent('<div style="position: relative; margin-left: 3px; margin-top: 4px;">Home</div>');
}
myTreeOnSelect(event: any): void {
let item = this.myTree.getItem(event.args.element);
let dropDownContent = '<div style="position: relative; margin-left: 3px; margin-top: 4px;">' + item.label + '</div>';
this.myDropDownButton.setContent(dropDownContent);
};
}