title: AngularJS controller function not getting executed
body: <p>Hi here is my angular js code. I am a complete novice in angular development.</p>
  
  <pre><code>&lt;div ng-app=""&gt;
      &lt;input type="text" ng-model="firstname"&gt;
      &lt;input type="text" ng-model="lastname"&gt;
      &lt;p&gt;Firstname : &lt;span ng-bind="firstname"&gt;&lt;/span&gt;
  
      &lt;/p&gt;
      &lt;p&gt;Lastname :&lt;span ng-bind="lastname"&gt;&lt;/span&gt;
  
      &lt;/p&gt;
      &lt;p&gt;Full name :&lt;span&gt;{{firstname +" "+lastname}}&lt;/span&gt;
  
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>You can find the fiddle <strong><a href="http://jsfiddle.net/Aneeshmohan/b28jxa4a/1/" rel="nofollow">here</a></strong></p>
  
  <p>If I don't add the <code>ng-controller</code> directive the whole thing works. But when I adds the directive the whole thing stops working and the controller function is not getting executed. </p>
  
  <p>Actually I am trying something similar to <strong><a href="http://www.w3schools.com/angular/tryit.asp?filename=try_ng_intro_controller" rel="nofollow">this</a></strong></p>