Figured it out, hopefully will help somebody in the future.
So you set a directive inside your custom daypilot-scheduler tag. Let's name it "dynamic-content".
<daypilot
- scheduler id="dp" daypilot-config="config" daypilot-events="events" dynamic-content></daypilot-scheduler>
Then you declare it.
app.directive('dynamicContent', ['$compile', '$timeout', function ($compile, $timeout) {
return {
restrict: 'A',
link: function(scope, element, attrs) {
$timeout(function () {
$compile(element.contents())(scope);
});
},
}
}]);
Dynamically added HTML needs to be compiled by Angular before the "ng-click" can fire. Also, the $compile function needs to run after the DOM has rendered, that's why we use the $timeout function without providing the "delay" parameter.