Angular Directive 1
by shravan
HTML
<div ng-app="MyApp">
<my-search-box></my-search-box>
</div>
JavaScript
angular.module("MyApp", []).
directive('mySearchBox', function() {
return {
restrict: 'E',
replace: true,
template: '<h1>My Custom Search Box</h1>'
};
});