extract classname from directive into attribute of directive