An example of displaying data with AngularJS when a button is pushed is
<!DOCTYPE html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script>
<script>
function Display($scope){
$scope.show_date = function(){
$scope.show=new Date();
}
}
</script>
</head>
<body ng-controller="Display">
<button ng-click="show_date()">Show date!</button>
<div ng-message="required"> {{show}} </div>
</body>
</html>
Where I was wrong in this code?