Document how to include a markdown file with ngInclude
rayshan opened this issue · comments
Thanks for the module Brian, works well.
Instead of inlining markdown, many would find it useful to use ngInclude
to include a markdown file, like so:
<md ng-include="path"></md>
Then define path
model in controller scope.
Reference:
http://docs.angularjs.org/api/ng/directive/ngInclude
Hi @rayshan,
thanks for the suggestion. I tried using ng-include
to load a markdown file without any modification to the existing code and it just worked. I suspect it's because ng-include
has higher priority so it gets executed first and then rendered by md
directive after.
I updated the demo page to show how to use md
with ng-include
. Check out the second example at http://brianpark.ca/projects/angular_md/demo/.
If you notice any problem, please let me know!
Cheers,
Brian
Sorry I wasn't clear, that's exactly my finding too. Isn't it nice when things just work haha!
oops. I guess I should've read the title before reading the body haha. Yeah, it's awesome that it just works. Cheers!