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