angular-highlightjs
angular-highlightjs copied to clipboard
use require.js was Error
when I use require.js management of my js code,load the angular-highlight.js is failed, The error message: "GET http://localhost:3000/js/hljs.js 404" but I did't create hljs.js file. and "require.js:166 Uncaught Error: Script error for: hljs"
I load highlight.js and angular.js is succeed, console.log('hljs') can see something about it.
how i need set angular-highlight.js??
Hi @ermu592275254
Sorry for the late response.
highlight.js
originally have their AMD module defined as hljs
. They've changed it to anonymous at https://github.com/isagalaev/highlight.js/commit/b4ea6460c91ca410bded7e4bdab346f4382c55b3.
You'll have to defined it yourself in order to use it with current angular-highlightjs
.
See https://github.com/isagalaev/highlight.js/issues/1288#issuecomment-243972595
Use highlight.js --> $('pre code').each(function(i, block) { hljs.highlightBlock(block); });