jQuery UI Widgets › Forums › Angular › jqxMenu add image runtime
Tagged: Angular menu, Menu, typescript menu
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 6 years, 6 months ago.
Hello!
Can you help me how to add an image to the menu item in runtime.
I add the data as follows:
private myMenuSettings: jqwidgets.MenuOptions = { theme: ‘bootstrap’, width: “120”, height: “58”, source: this.myMenuSource, }
this.myMenuSource[0] = { label: “add”, value: “add” }; this.myMenuSource[1] = { label: “delete”, value: “delete” };
Hello Digger44,
You could try to update the source with the new values. It is possible to add new items with html field: let newSource = [{ label: 'Item 1', value: 1, html: '<img src="item1.jpg">' }]
html
let newSource = [{ label: 'Item 1', value: 1, html: '<img src="item1.jpg">' }]
Best Regards, Hristo Hristov
jQWidgets team http://www.jqwidgets.com
You must be logged in to reply to this topic.