I am looking to develop a custom directive that will transform :
<my-overlay class="someOverlay">
<h4>Coucouc</h4>
</my-map-overlay>
Into :
<div class="someOverlay default-overlay">
<h4>Coucouc</h4>
</div>
The use of the replace
method has been deprecated.
How can I create a directive that manipulates the DOM by generating a div
, adds the default-overlay
class in addition to the existing one, transcludes content, and replaces the <my-map>
directive?
Is it feasible to split this process into two parts: handling DOM manipulation in the compile
function and transcluding in the link
function?