-
-
Save dyaa/f668fb3fb5e7bb8ec30d to your computer and use it in GitHub Desktop.
Using PrismJs with AngularJs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('Prism', []). | |
directive('prism', [function() { | |
return { | |
restrict: 'A', | |
link: function ($scope, element, attrs) { | |
element.ready(function() { | |
Prism.highlightElement(element[0]); | |
}); | |
} | |
} | |
}] | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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