AngularJS simple directive
by klode
HTML
<div ng-app="myApp">
<sample-text></sample-text>
</div>
JavaScript
var app = angular.module('myApp', []);
app.directive('sampleText', function () {
return {
restrict: "E",
template: '<div>Some sample text here.</div>'
};
});