I'm trying to render github readme's using remarkable and angular. Everything related to parsing the markdown is working properly but unfortunately the product owner has some more wishes for the application.
He wants to be able to put youtube video's and html forms in the readme. I'm currently using the Youtube-embed directive made by Brandly but unfortunately it does not render in our page.
I am using a script which uses ng-bind-html in combination with $sce.trustAsHtml in order to parse html in the page. Normal HTML is picked up just fine (form tags and other stuff) but angular stuff (youtube directive as example) aren't.
I also noticed that angular directives such as ng-click, ng-submit etc aren't working. Does anyone know how to make angular work in html which is bieing parsed within the angular application using ng-bind-html?
Here is a code example on how the html is bieing parsed to the template:
JS:
case 'markdown': $scope.fileContent = $sce.trustAsHtml(remarkable.render(content)); break; HTML:
<pre class="fileContent"><code ng-bind-html="fileContent"></code></pre> i've added a Plunker example with the problem I am having, as you can see it never executes the ng-submit that I added in the form.
~ Archcry
$compileyesterday but it seems like it only works in directives or something, I can't really find a good example on the internet with$compile.