Register a module in html template
<p>I have to add a module to a Html template.
eg: "&lt;div my-directive ui-grid-edit&gt;&lt;/div&gt;"</p>

<p>Now I am creating this directive'myDirective' and want to add ui-edit-grid module to it in the template. As in to add attributes, I can use template.attr('myAttribute','attribute value');
How can I do so for module?</p>

<p>Existing base template:
    GridController.prototype.initTemplate= function($scope,$element,$compile){</p>

<pre><code>    var baseTemplate = $element.html('&lt;div id=\"id1\" ui-grid=\"gridOptions\" &gt;&lt;/div&gt;').contents();
    $compile(baseTemplate)($scope);
    }
</code></pre>

<p>Now I want to change the template to :
    GridController.prototype.initTemplate= function($scope,$element,$compile){</p>

<pre><code>    var baseTemplate = $element.html('&lt;div id=\"id1\" ui-grid=\"gridOptions\" ui-grid-edit &gt;&lt;/div&gt;').contents();
    $compile(baseTemplate)($scope);
    }
</code></pre>