This question partly explains why your method doesn't work: How to pass custom directive name dynamically in class attribute of div tag?
Also, that is not the angular-esque way of doing things. I suspect this would be more angular like while doing what you want: http://plnkr.co/edit/fNZvZ1vzQYQLjZti37GQ?p=preview
Template
<div class="whatever" ng-if="!directiveOn">div.whatever</div>
<div newstuff ng-if="directiveOn">div.whatever</div>
Controller
$scope.directiveOn = false;
$scope.click = function() {
$scope.directiveOn = true;
};
The other option would be to pass the directive the information of whether it is turned on or off.