I have a menu widget in which each menu item can expand into another submenu. Something similar to this: http://plnkr.co/MGqCkAFUexSzSfcwthu5?p=preview
Link markup:
<a class="link-class"
ng-href={{ getLink(item) }}
ng-style="setTextAlignment(level)">
{{ item.name }}
</a>
Using the following method defined in the controller:
CollapsibleSubMenu.getLink_ = function(scope, item) {
console.log('link called');
return item['subMenu'] ? '' : item['link'];
};
Basically, if an element has a submenu (submenu === true), it should not have href (but the data from the backend elements have elements with a submenu: true and a valid link. This was good for the old menu implementation.)
, , , , console.log " " . . , getLink ?