UNPKG

jqwidgets-scripts-custom

Version:

jQWidgets is an advanced jQuery, Angular 7, Vue, React, ASP .NET MVC, Custom Elements and HTML5 UI framework.

29 lines (22 loc) 685 B
import { Component, ViewChild, AfterViewInit, ElementRef } from '@angular/core'; import { jqxMenuComponent } from 'jqwidgets-scripts/jqwidgets-ts/angular_jqxmenu'; @Component({ selector: 'app-root', templateUrl: './app.component.html' }) export class AppComponent implements AfterViewInit { @ViewChild('jqxMenu') jqxMenu: jqxMenuComponent; @ViewChild('log') log: ElementRef; ngAfterViewInit() { this.jqxMenu.focus(); } getWidth() : any { if (document.body.offsetWidth < 600) { return '90%'; } return 600; } itemclick(event: any): void { this.log.nativeElement.innerHTML = "Clicked: " + event.args.innerText; }; }