AngularJS - Directives

first directive

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.13/angular.min.js"></script>
<div ng-app="myApp">  
     <!-- directive:superman -->
</div>

JavaScript

var myApp = angular.module('myApp', []);

myApp.directive('superman', function() {
    return {
        restrict: 'M',
        template: " <div> I am from Krypton. </div> "
    };
});