AngularJS Example

HTML

<div ng-app="helloHabrahabr">
        <span habra-habr="hello" some-attr="Hello Habr!"></span>    
</div>

JavaScript

angular.module('helloHabrahabr', [])
    .directive('habraHabr', function() {        
        return {
            template:"{{someAttr}}-{{qwerty}}",
            scope:{
                someAttr:'@someAttr'
            },
            
            link: function (scope, element, attrs) {
            	var qwerty = attrs.someAttr;
              console.log('qwerty', qwerty);
              console.log('someAttr', someAttr);
            }
        }
    });