Building a directive as an interface component