LERGO-292 - decided that angular-ui has a bug and decided to implement my own solution.