title: AngularJS $apply not working
body: <p>I have a app with code i want to prettify with prettify.js, but i cant get the apply method to work with angular 1.2. However it works with 1.1.</p>
  
  <p>Because i cannot load the prettify lib on the body load because of angular, i have tried creating a filter like this</p>
  
  <pre><code>App.controller('myCtrl', function($scope) {
      setTimeout(function() {
          $scope.text = "function apply() { return 'not working..'; }";
          $scope.$apply();
      }, 0);
  });
  
  App.filter('pretty', function(){
      return function(text) {
          return prettyPrintOne(text);
      }
  })
  </code></pre>
  
  <p>And the HTML</p>
  
  <pre><code>&lt;div ng-app="Knob" ng-controller="myCtrl"&gt;
      &lt;pre ng-bind-html-unsafe="text|pretty"&gt;&lt;/pre&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here the working fiddle: <a href="http://jsfiddle.net/L66nJ/" rel="nofollow">working fiddle</a>.</p>
  
  <p>When angular is changed to 1.2 apply breaks (or maybe something else?)</p>
  
  <p>Failing fiddle (same code, updated angularjs ) <a href="http://jsfiddle.net/nRvkZ/" rel="nofollow">broken fiddle</a></p>