In jQuery we can get append an event after append html:
$('ul').delegate('a','click',function() {
// your code here ...
});
Or we can:
$(document).on('click','ul li a', function(){
// your code here ..
});
How can we do it in AngularJS after append html?
<div ng-bind-html="getSomehtml(l)"></div>
$scope.getSomehtml= function (l) {
let namepath = 'a/b/c';
let t = namepath.split('/').map(function (text, i) {
return '<span ng-click="changeNamePath(' + i + ',' + namepath+')"' + i + '>' + text + '</span>';
}).join('/');
return t;
};