JSFiddle - React, Tailwind, and code Playground
HTML
<div data-ng-app="TestApp">
<div data-ng-controller="TestCtrl">
<div>
<input type="text" data-ng-model="message" />
<button type="button" data-ng-click="changeVariable1()">{{variable1 ? "Hide" : "Show"}} message</button>
</div>
<div style="background-color: yellow" data-ng-show="testShow()">
{{message}}
</div>
<div>
</div>
</div>
</div>
JavaScript
angular
.module('TestApp',[])
.controller('TestCtrl',
function TestCtrl($scope) {
$scope.variable1 = false;
$scope.message = '';
$scope.testShow = function() {
return $scope.variable1 && $scope.message !== '';
};
$scope.changeVariable1 = function() {
$scope.variable1 = $scope.variable1 === false;
};
});