<markdown>
태그를 렌더링하라는 지시문에 의해 출력되는 <code>
태그를 강조 표시하는 지시문 작업.지시문 내부 지시문
<markdown>
지시문을 실행 한 후에 <code>
지시문이 절대 실행되지 않는 문제가 있습니다. 그러나 <code>
지시문은 <markdown>
지시문에서 출력되지 않는 코드 태그에서 실행됩니다.
Markdown을 지시
angular.module('App').directive "markdown", ->
converter = new Showdown.converter()
scope: true
restrict: 'E'
link: (scope, element, attrs) ->
if attrs.markdown
scope.$watch attrs.markdown, (newVal) ->
html = converter.makeHtml(newVal)
element.html(html)
else
redraw = ->
html = converter.makeHtml(element.text())
element.html(html)
#### expecting the code directive to be trigger after this.
scope.$on "$includeContentLoaded", redraw
redraw()
어떤 생각?