I've got this code:
<html>
<head>
</head>
<div ng-app="" ng-controller="Test">
<input type="text" ng-model="inputty">
<p>{{output}}</p>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>    
<script>
  function Test($scope){
    if($scope.inputty=="Hello") {
      $scope.output="OK!";
    } else {
      $scope.output="NOT OK!";
    }
  }
</script>
</html>
But it's not working, the NOT OK! displays. But it's like the if statement can't read from inputty. So it should state OK! when I type Hello in the input box.





$scope.output = function(){ return $scope.inputty=="Hello" ?"OK!" : "NOT OK!"; }and do<p>{{output()}}</p>