One way to showcase data using AngularJS is by triggering a function with a button click. Here's an example:
<!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>
What mistakes can you find in this code snippet?