Angular-asciidoc-directive use the project asciidoctor.js the javascript version of AsciiDoctor to generate the HTML render.
Asciidoctor.js couldn't work with AngularJS out of the box, Opal, the cross-compiler used to generate the JS file, add $inject
method :
To resolve the problem, the project use grunt and 'string-replace' to modify asciidoctor.js :
...
'string-replace': {
options: {
replacements: [
{
pattern: /(\$inject)/ig,
replacement: '\$opalInject'
},
{
pattern: /(\$scope)/ig,
replacement: '\$opalScope'
}
]
},
...
bower install angular-asciidoc-directive
- Include the
asciidoc.all.js
script into your app.opal.js
andasciidoctor.js
are include and minify in theasciidoc.all.js
. - Add
aql.asciidoc
as a module dependency to your app. - See examples/demo.html for usage
MIT