Refactoring DomainDropdown directive