title: Initialize AngularJS controller after append some html into DOM
body: <p>Is there a way how to use $compile from pure javascript? I'm combinating basic javascript and places where I'm using Angular and can't find a way how to do something like this: <a href="http://jsfiddle.net/DavidSlavik/bFdcJ/1/" rel="noreferrer">http://jsfiddle.net/DavidSlavik/bFdcJ/1/</a></p>
  
  <p>I think I need use $compile but from place where is no any scope.</p>
  
  <pre><code>angular.module('myApp', []);
  
  function ExpensesCtrl($scope) {
  
      // Here are some master functions...    
  
  }    
  
  
  $(function () {
  
     // Here is the Ajax function that returns html from my MVC action processed with Razor
     // Here I'm not using AngularJS and scopes...
     var htmlFromAjax = '&lt;div id="mapOrder" ng-controller="sortable"&gt;&lt;div ng-repeat="item in SortItems"&gt;{{item.Title}}&lt;/div&gt;&lt;/div&gt;';
     $('body').append(htmlFromAjax);
  
  });
  
  function sortable($scope, $http, $element) {
  
      // Here is the Ajax function that return JSON object. For example it is commented and used static variable SortItems in scope.
      //$http.get('someUrlWitchReturnsJsonObject')
      //    .success(function (e) {
      //        $scope.SortItems = e;
      //    });
  
      $scope.SortItems = JSON.parse('[{"Title":"ddddddd","MapId":5,"Order":0},{"Title":"Moje mapa","MapId":3,"Order":2},{"Title":"asdas","MapId":4,"Order":3},{"Title":"asds","MapId":7,"Order":4},{"Title":"Pokus","MapId":8,"Order":5},{"Title":"Hello world!!!","MapId":1,"Order":10}]');
  </code></pre>