title: AngularJS Manually Render Controller and Template
body: <p>I'm trying to implement a plugin system in angularjs that would allow users to configure which  "widgets" they will see on a certain page. Each widget is defined by a controller and a template(url). Is it possible to create a directive that instantiates a controller, invokes it with a template and transcludes the resulting content?</p>
  
  <p>The goal is something like this:</p>
  
  <pre><code>&lt;div class="widget" ng-repeat="widget in widgets"&gt;
      &lt;widget controller="widget.controller" templateUrl="widget.templateUrl"&gt;&lt;/widget&gt;
  &lt;/div&gt;
  </code></pre>