How open a new tab of link using kendo panel bar

415 Views Asked by At

I am using Kendo panel bar to make a menu. Here I encountered a requirement: enable to open a new tab using panel bar. I found that the router link in the panel bar cannot support my requirement. Does anybody have good solution? Many thanks.

1

There are 1 best solutions below

0
On

This is very crude as far as looking for something to key off for child elements only but it works. Might something like this work for you? Your question is a little vague, I am assuming you want the ability to open a page in a new tab.

This is for jQuery, just noticed you were looking for angular.

See in JS Fiddle

// event handler for select
var onSelect = function(e) {
    // access the selected item via e.item (HTMLElement)
    if (!$(e.item).attr("aria-expanded")) {
        //Child elements only
        window.open("http://www.google.com", "_blank");
    }
};

// attach select event handler via bind()
$("#panelbar").data("kendoPanelBar").bind("select", onSelect);