Modified version of ui-bootstrap from plnkr.co/edit/B2wEis