Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use require.js was Error #79

Open
ermu592275254 opened this issue Oct 24, 2016 · 2 comments
Open

use require.js was Error #79

ermu592275254 opened this issue Oct 24, 2016 · 2 comments

Comments

@ermu592275254
Copy link

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??

@pc035860
Copy link
Owner

Hi @ermu592275254

Sorry for the late response.

highlight.js originally have their AMD module defined as hljs. They've changed it to anonymous at highlightjs/highlight.js@b4ea646.

You'll have to defined it yourself in order to use it with current angular-highlightjs.

See
highlightjs/highlight.js#1288 (comment)

@caemasar
Copy link

Use highlight.js -->
$('pre code').each(function(i, block) {
hljs.highlightBlock(block);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants