JSFiddle - React, Tailwind, and code Playground

HTML

<script type="text/ng-template" id="toggle-button.html">
    <button ng-click="toggleFlag()">I Toggle the Flag</button>
    <button ng-click="flag = !flag">I Do Nothing</button>
</script>
<span ng-include="'toggle-button.html'"></span>
The flag is {{flag}}

JavaScript

var app = angular.module('myApp', [])
    .controller("myController", ['$scope', function($scope){
        $scope.flag = true;
        
        $scope.toggleFlag = function(){
            $scope.flag = !$scope.flag;
        }
    }])