JSFiddle - React, Tailwind, and code Playground

HTML

<div ng-app="myApp" ng-controller="MyCtrl">testing...
    <div  ng-if="data ==2"  ng-model='data'>
        <div>it's one</div>
    </div>
</div>

JavaScript

var myApp = angular.module('myApp', []);

myApp.directive('ngIf', function () {
    return {
      
        link: function (scope, element, attrs) {
            console.log(attrs.ngIf);
            if (scope.$eval(attrs.ngIf)) {
          
            } else {
                element.html('');
              
            }
        }
    }
});

function MyCtrl($scope) {
    $scope.data = 1;
}