apply directives to new element