ticket:6 merged with 5 ticket, added the ability to use the directive as an element