JSFiddle - React, Tailwind, and code Playground

by Anton Ratenko

HTML

<body ng-app="developerApp">
	<developer js html angularjs>Senior developer</developer>
	<developer html>Junior developer</developer>
</body>

CSS

developer {display: block;padding: 10; border: 1px solid green}

JavaScript

angular.module("developerApp", [])
.directive("developer", function() {
	return {
		restrict: "E",
        scope: {},
		controller: function($scope) {
			$scope.skills = [];

			this.iKnowJS = function() {
				$scope.skills.push("JS");
			};

			this.iKnowHTML = function() {
				$scope.skills.push("HTML");
			};

			this.iKnowAngularJS = function() {
				$scope.skills.push("AngularJS");
			};
		},
		link: function(scope, element){
			element.bind("mouseenter", function() {
				console.log(scope.skills);
			});
		}
	}
}).directive("js", function() {
	return {
		require: "developer",
		link: function (scope, element, attrs, developerCtrl) {
			developerCtrl.iKnowJS();
		}
	};
})
.directive("html", function() {
	return {
		require: "developer",
		link: function (scope, element, attrs, developerCtrl) {
			developerCtrl.iKnowHTML();
		}
	};
}).directive("angularjs", function() {
	return {
		require: "developer",
		link: function (scope, element, attrs, developerCtrl) {
			developerCtrl.iKnowAngularJS();
		}
	};
});