title: Angular JS TypeError: f is not a function
body: <p>I'm trying to figure out as to why my timeout function is giving error, thereby restricting the change in model value.</p>
  
  <p><strong><em>angularExample.html</em></strong></p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app="Tutorial"&gt;
    &lt;head&gt;
      &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"&gt;
      &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="scripts/app.js"&gt;&lt;/script&gt;
    &lt;/head&gt;
  &lt;body ng-controller="MyController"&gt;  
       &lt;input type="text" ng-model="data" /&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p><strong><em>app.js</em></strong></p>
  
  <pre><code>(function() {
  
    var app = angular.module('Tutorial', []);
  app.controller("MyController",function($scope,$timeout){
  
      $scope.data="hi";
      $timeout(callAtTimeout,3000);
  
      var callAtTimeout=function(){$scope.data="hello";}
  });
  })();
  </code></pre>
  
  <p><strong><em>Error Snapshot:</em></strong>
  <img src="https://i.stack.imgur.com/qAzaG.png" alt="enter image description here"></p>