<!doctype html>
<html ng-app="myApp">

<head>
  <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.7.5/angular.min.js"></script>
  <script src="app.js"></script>
  <link rel="stylesheet" href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.0.4/css/bootstrap-combined.min.css">
</head>

<body ng-controller="mainCtrl">
  <h1>Test</h1>
  <button ng-click="makeRestCall()">
    Make Rest Call
  </button>
</body>

</html>

<!-- 
Copyright 2018 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at https://angular.io/license
-->
angular.module('myApp', [])
  .controller('mainCtrl', function($scope) {
    $scope.makeRestCall = function() {
      var accepted = confirm('Are you sure you want to proceed.')
      if(accepted)
      console.log('Logic to make rest call...');
    };
  });


/*
Copyright 2018 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at https://angular.io/license
*/