Component detect if display as modal

Is it possible to check if a component is displayed as model (or nav pushed, or popover, or embedded, …)?
Without passing custom params. In my case: I want to display a close button on the right side in the header navbar of a component / ionic page. But only if I display it as modal. As page, the back-button is automatically added. But in modal mode, the user have to click the Android back button, if the modal is fullscreen and no backdrop is available.