Closed balasivagnanam closed 8 years ago
Hi @balasivagnanam ,
The include
directive in angular-highlightjs
as well as the built-in ng-include
accept angular expression.
Simply put fileName
in the include
and it'll wok, since fileName
itself is a valid angular expression whose eval result is "file.html"
(string).
<div hljs include="fileName"></div>
Here's the working plunk http://plnkr.co/edit/BRY4MHZHM5BqLWKU0ibV
that works. thanks a lot. I am new to angular, sorry about that stupid question.
Hi thanks for the awesome library, it is highly useful.
Currently I am facing an issue in rendering the code block.
In my case the code block that I want to render, is in separate file. Also I want to make this configurable, this will be an input from JSON file. But when I use a scope variable as a paramater inside "include" it is not working.
check the plunker that I created for this. http://plnkr.co/edit/4VoplzSggll1Qei6L2qO