title: AngularJS - How can I create a new, isolated scope programmatically?
body: <p>I want to create an AlertFactory with Angular.factory.
  I defined an html template like follow </p>
  
  <pre><code>var template = "&lt;h1&gt;{{title}}&lt;/h1&gt;";
  </code></pre>
  
  <p>Title is provided by calling controller and applied as follow</p>
  
  <pre><code>var compiled = $compile(template)(scope);
  body.append(compiled);
  </code></pre>
  
  <p>So, how I can pass isolated scope from controller to factory?
  I'm using in controller follow code</p>
  
  <pre><code>AlertFactory.open($scope);
  </code></pre>
  
  <p>But $scope is global controller scope variable. I just want pass a small scope for factory with just title property.</p>
  
  <p>Thank you.</p>