title: FizzBuzz in angular?
body: <p>I am trying to learn Angular and I am trying to make a fizzBuzz however; I don't get result with 'both' conditions:</p>
  
  <p>Here is the app:</p>
  
  <pre><code>var myApp = angular.module("myApp", []);
  
  myApp.controller("game", ["$scope", function($scope) {
  
  $scope.number = 0;
  $scope.result = "";
  
  $scope.fizzBuzz = function(){
  
    if($scope.number){
  
        if($scope.number % 3 == 0)
        {
          return $scope.result = "Fizz";
        }
        else if($scope.number % 5 == 0)
        {
          return $scope.result = "Buzz";
        }
        else if(($scope.number % 3 == 0) &amp;&amp; ($scope.number % 5 == 0))
        {
          return $scope.result = "FizzBuzz";
          alert($scope.result);
        }
    }else{
        return "Enter a Number";
    }
  
  };
  
  }]); 
  </code></pre>
  
  <p>and binding:</p>
  
  <pre><code>&lt;div ng-controller="game"&gt;
  
  &lt;input type="text" ng-model="number"&gt;
  
  &lt;h1&gt;{{fizzBuzz(result)}}&lt;/h1&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>It can't get 'FizzBuzz'but 'Fizz' and 'Buzz' ..</p>
  
  <p>That works with plain js good. I just can't see if this is a sytax error..?</p>
  
  <p>Live: <a href="http://jsfiddle.net/huguxvmx/1/" rel="nofollow">http://jsfiddle.net/huguxvmx/1/</a></p>
  
  <p>Thnx in advance!</p>