Skip to content

Instantly share code, notes, and snippets.

@dyaa
Forked from SelrahcD/gist:7042692
Last active August 29, 2015 14:16
Show Gist options
  • Save dyaa/f668fb3fb5e7bb8ec30d to your computer and use it in GitHub Desktop.
Save dyaa/f668fb3fb5e7bb8ec30d to your computer and use it in GitHub Desktop.
Using PrismJs with AngularJs
angular.module('Prism', []).
directive('prism', [function() {
return {
restrict: 'A',
link: function ($scope, element, attrs) {
element.ready(function() {
Prism.highlightElement(element[0]);
});
}
}
}]
);
<pre>
<code class="language-markup" prism>
{{ snippet }}
</code>
</pre>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment