Simple directive
HTML
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
<div ng-app="myApp" ng-controller="myCtrl">
<car tires="tires"></car>
</div>
JavaScript
angular
.module('myApp', [])
.controller('myCtrl', function($scope){
$scope.tires = 2;
})
.component('car', {
bindings : {
tiresCount : '<tires'
},
template : '<b>I am car with {{$ctrl.tiresCount}} tires.</b>'
});