JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.js"></script>
<body class="fa" ng-app="app" ng-controller="ctrl">
<div class="container fa">
    <input type="text" placeholder="write something" ng-model="something" />
    <input type="email" placeholder="type your email" ng-model="email" />
</div>
<div>
    {{ something }}:::{{ email }}
</div>
</body>

JavaScript

var isFa = angular.element(document.body).hasClass('fa');
console.log('isFa:', isFa);

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

app.directive('input', function() {
    return {
        restrict: 'E',
        link: function(scope, elem) {
            if( isFa && elem.attr('type') === 'text' ) {
                elem.attr('lang','fa');
            }
        }
    };
});

app.controller('ctrl', function($scope) {
    $scope.something = null;
    $scope.email = null;
});