Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

How to override back button or enrich an ionic component

$
0
0

@Christiaan_Sins_CACI wrote:

Hello Folks!

We are using Ionic 3.4.2 for our Desktop and Mobile application.
We would like to set the title and aria-label attributes of the ionic back button.

Is there a generic way to override the ionic back button or is there a easy way to 'enrich' an ionic component?

For now we added the following code inside the ionic page

@ViewChild(Navbar) navbar: Navbar;

ionViewDidEnter () {
        let navbar = this.navbar;
        let backbutton = navbar.getNativeElement().querySelector('.show-back-button');
        if (backbutton !== undefined && backbutton !== null) {
            let title = 'back-title';
            backbutton.setAttribute("title", title);
        }
    }

Kind regards

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>