An ion-back-button will not show in a SvelteKit project - if it does not have an explicit default-href or initialize does not have explicit default path.
Example:
<script lang="ts">
import { close } from 'ionicons/icons';
</script>
<ion-header>
<ion-toolbar>
<ion-back-button text="Volver" icon={close} on:click={console.log} />
</ion-toolbar>
</ion-header>
https://github.com/ionic-team/ionic-framework/issues/26550
An ion-back-button will not show in a SvelteKit project - if it does not have an explicit
default-href
orinitialize
does not have explicit default path.Example:
Will not show the back-button.
This will work:
<ion-back-button default-href="/"></ion-back-button>
But is boilerplate also given earlier issue - https://github.com/ionic-team/ionic/issues/19305
So when I add
{ backButtonDefaultHref: '' }
toinitialize()
taken from@ionic/core
, it does show