title: Uncaught TypeError: angular.model is not a function in Angular JS
body: <p>I am trying some angular JS examples but i stuck in the above error. Please anyone help me to resolve this issue. </p>
  
  <pre><code> &lt;html&gt;
      &lt;head&gt;
       &lt;script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"&gt;&lt;/script&gt;
       &lt;/head&gt;
     &lt;body&gt;
    &lt;div ng-app="mainApp" ng-controller="MyCtrl"&gt;
     &lt;table border="0"&gt;
      &lt;tr&gt; &lt;td&gt; First Name : &lt;/td&gt; &lt;td&gt; &lt;input type="text" ng-model="st.fname"&gt; &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt; Last Name : &lt;/td&gt; &lt;td&gt; &lt;input type="text" ng-model="st.lname"&gt;               &lt;/td&gt; &lt;/tr&gt;
     &lt;tr&gt; &lt;td&gt; Full Name : &lt;/td&gt; &lt;td&gt; {{ st.fullname() }} &lt;/td&gt; &lt;/tr&gt;
      &lt;tr&gt; &lt;td&gt; Subjects : &lt;/td&gt;&lt;/tr&gt;
     &lt;table&gt;
       &lt;tr&gt;
        &lt;th&gt; Name &lt;/th&gt;
        &lt;th&gt; Marks &lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr ng-repeat="subject in st.subjects"&gt;
        &lt;td&gt;{{ subject.name}} &lt;/td&gt;
        &lt;td&gt;{{ subject.marks}} &lt;/td&gt;
      &lt;/tr&gt;
     &lt;/table&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
     &lt;/div&gt;
  
     &lt;script&gt;
      var mainApp = angular.model('mainApp');
      mainApp.controller('MyCtrl', function($scope) 
      {
       $scope.st = {
      fname : "Naveen",
      lname : "Kumar",
      subjects: [
      {name: 'Physics', marks: 70},
      {name: 'Mthamatics', marks: 50},
      {name: 'Chemistry', marks: 80}
      ],
      fullname: function()
       {
         var studentObject = $scope.st;
         return studentObject.fname + " " + studentObject.lname;
       } 
      };
     });
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>After Executing the it throws error.</p>
  
  <p>Uncaught TypeError: angular.model is not a function</p>