Add supporting for attribute for directive

Now we can use attribute beside the element name for directive