The solution doesn’t require writing a specific directive or adding any additional attributes or decoration to my page content - a short timeout (like, 1ms short) inside of which Prism.highlightElement(elem) is called.
// Content is my service, getBySlug returns the page by name
Content.getBySlug($routeParams.slug, type).then(function (data) {
$scope.bodyText = $sce.trustAsHtml(data.BodyText);
});
// bodyText has changed, better check for code...
$scope.$watch('bodyText', function (newVal, oldVal) {
setTimeout(function () {
var code = document.getElementsByTagName('code');
angular.forEach(code, function(c) {
Prism.highlightElement(c);
});
}, 1);
});
Source: http://nathanw.com.au/blog/using-prism-js-syntax-highlighting-with-angularjs/