AngularJS directives for Prism code highlighting.
npm install @microfocus/ng-prismnpm install joswhite/ng-prism
angular.module('myApp', ['ng-prism']);
src/index.html
pre > code[highlight="language-xxxx"] (highlights the code inside it)
highlight attribute specifies PrismJS language (default: language-javascript)
pre > code[highlight] instead
repeat-as-code attribute (retains HTML element and highlights the code that created it)
repeat-as-code="inner" highlights the code that created its HTML children elements
prism-insert-id attribute specifies where the highlighted code should be inserted
toggle-repeat-code attribute (repeat-as-code with a "Show Code" button)
toggleable-code element ("Show Code" button to show/hide everything inside it)
npm start and navigate to localhost:8080.
npm install -g gulp
gulp build:development
gulp
src/main.scss