angular-highlight
highlight.js in angularjs
A directive to useMotivation
Sometimes we need to build dinamic code examples with beautiful colors. To ignore angular elements after compile and some colors, we created this directive
Installation
npm install angular-highlight
Usage
;; angular;
in html
import highlight.js css
and then
var hello = 'Hello World'; var hello = 'Hello you!'; console.log(hello);
or
var hello = 'Hello World'; var hello = 'Hello you!'; console.log(hello);
output a html wrapped by <code>
element with hljs elements/classes to show like:
var hello = 'Hello World'; console;
raw output
var hello = 'Hello World'; console.log(hello);