title: AngularJS $parse TypeError: object is not a function
body: <p>I have stripped my app down to the bare bones but I keep getting this error when using $parse: <strong>TypeError: object is not a function</strong></p>
  
  <p>What is wrong? What am I missing?</p>
  
  <p>Seems to work fine in this plunker: <a href="http://plnkr.co/edit/WrXv9hT5YA0xYcLLvyDb" rel="nofollow">http://plnkr.co/edit/WrXv9hT5YA0xYcLLvyDb</a><br>
  Could parse be conflicting with some other module?</p>
  
  <p>Weirder still - it actually does change the value of $scope.modal.on! Even though it appears to die before hand...</p>
  
  <pre><code>/* Controllers */
  
  //var MyApp = angular.module('MyApp', ['ngSanitize', 'ui.bootstrap', 'ui.sortable']);
  var MyApp = angular.module('MyApp', ['ngSanitize', 'ui.bootstrap']);
  
  
  MyApp.controller('MyController', ['$scope', '$http', '$modal', '$parse', function($scope, $http, $parse, $modal, $log) {
  
  
  
      $scope.modal = { 
          open    : false,
          tplfile : null,
          toggle  : function(){ 
              this.open = !this.open; 
              if(this.open) angular.element('body').addClass('modal-open');
              else          angular.element('body').removeClass('modal-open');
          }   
      };
  
          var modal = $parse('modal.open');
          modal.assign($scope, true);
  
  }]);
  </code></pre>