Fixed issue #76 that throws an error when displaying charts in angular-ui-bootstrap modal