JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="App" ng-controller="Ctrl">
<input ng-model="myVar" />
<my-dir>
<input ng-model="myVar" />
</my-dir>
</div>
<script>
angular
.module('App', [])
.controller('Ctrl', function ($scope) {
$scope.myVar = 111;
})
.directive('myDir', function () {
return {
restrict: 'E',
transclude: true,
template: '<hr>[<b ng-transclude></b>]'
}
});
</script>