It makes sense to $compile/$link first and then add the element to the DOM tree. This is to avoid a repaint/reflow by the browser.