EDITABLE CODE:
LiveDemo:AngularJS Complex Directives : Using a Function as Templates
Note:The value of the property restrict is set as A i.e attribute, since directive is used as an Attribute.