AngularJS: How can I append an element from a link function and have angular run a directive in it?

I have two directives 'chart', and 'legend'.

From the chart directive I append

<legend forScope="' + scope.$id + '"></legend>

but the legend directive never runs. How do I get angular to process the legend element?

Without looking at your code, it is not clear what are you doing. But generally, you will use the $compile service to compile the generated content before appending it to the dom. See http://docs.angularjs.org/api/ng.$compile