JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="test">
    <div ng-controller="cont">
        <button ng-click="updateStatus()">TOGGLE ATTRIBUTE </button>
        <div id="test" class="{{status}}">TEXT </div>
    </div>    
</div>

CSS

#test{
    background : green;
}
#test[someattr] :{
    background : 'grey';
}

JavaScript

var angApp = angular.module('test',[]);
angApp.controller('cont', ['$scope', function($scope){
	$scope.status = 'someattr';
	
    
    $scope.updateStatus = function() {
        if( $scope.status == 'someattr'){
          $scope.status = '';
        }else{
            $scope.status = 'someattr';
        } 
    };
}])