, , .
Add a parameter to the public function and pass it thisas a pointer to the current dom element.
<span ng-bind-html="item.Name | linky" ng-click="open(item,this)"></span>
now in your open function EDITED CODE:
function open(item,this)
{
var children = this.childNodes;
for(a in children )
{
if(children[a].href)
{
return false;
}
}
.
.
.
}
therefore, the method will be called, but will return false if it is a binding tag.
It may not be what you want, but it will serve your purpose :)
source
share