JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.8/angular.js"></script>
<div ng-app='app' ng-controller='Test1'>
  {{TestStr}}
</div>

JavaScript

angular.module("app",[])
.controller("Test1", function($scope){
    $scope.TestStr = "This is a test string";   
})
.run(function($rootScope) {
	var $offFunction = $rootScope.$on("$locationChangeStart", function(e) {
      if (confirm("Are you sure")) 
      	return $offFunction();
      return e.preventDefault();
  });
});