Edit in JSFiddle

function LikeExample($scope) {
    
    $scope.like = false;  
    
    $scope.toggleLike = function() {
        $scope.like = !$scope.like;
    };
    
}


<div ng-app>
  <div ng-controller="LikeExample">
    <p>{{like?'You like this.':'You don\'t like this.'}}</p>
    <form ng-submit="toggleLike()">
      <input type="submit" value="Click to toggle.">
    </form>
</div>

              
            
          
            
              

External resources loaded into this fiddle: