Tommertom / svelte-ionic-npm

NPM package that goes along with Ionic Svelte integration demo
MIT License
19 stars 0 forks source link

ion-back-button will only show with explicit defaulted href #15

Open Tommertom opened 1 year ago

Tommertom commented 1 year ago

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 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>

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: '' } to initialize() taken from @ionic/core, it does show