highlight.js and AngularJS

221 views
Skip to first unread message

Jan Bilek

unread,
Oct 9, 2012, 9:48:48 AM10/9/12
to highl...@googlegroups.com
Hi,

has anyone tried/managed to make highlight.js working with AngularJS, for example highlighting code in blocks generated by ng-repeat?

I know I need to call highlight after the DOM is ready and I am trying to make it work - I would love to see a working example. Anyone wants to share?

Thank you and have a nice day.

Ivan Sagalaev

unread,
Oct 10, 2012, 11:04:55 PM10/10/12
to highl...@googlegroups.com
Sorry, I can't say anything about angular.js in particular but marrying
highlight.js with any other framework shouldn't be a problem. If hooking
up to the DOM ready event is not an option you can always manually call
`hljs.highlightBlock()` for every code block whenever it appears on the
page.
Reply all
Reply to author
Forward
0 new messages