Dynamically injecting a directive