title: How to show return value of a function with Angularjs
body: <p>I'm trying to use <code>Angularjs</code>. How can I show a result of a function in a view?</p>
  
  <p>I have a HTML like this.</p>
  
  <pre><code>&lt;body ng-controller="fooCtrl"&gt;
    &lt;p&gt;a: {{ a }}&lt;/p&gt;
    &lt;p&gt;b: {{ b }}&lt;/p&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>And javascript for it.</p>
  
  <pre><code>fooApp.controller('fooCtrl', ['$scope', function ($scope) {
    $scope.a = 3;
    $scope.b = function(){
      return 4;
    };
  }]);
  </code></pre>
  
  <p><code>a</code> is properly shown, but <code>b</code> is blank. What am I doing wrong?</p>