Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set title in browser for Ionic apps

I am developing an Ionic App that will run as a web app on browsers too.

In html, I have the following code:

<ion-header>
  <ion-navbar>
    <ion-title>Login</ion-title>
  </ion-navbar>
</ion-header>

I thought that the ion-title tag was enough to change the title on the browser tab, but it seems it isn't. It remains "Ionic App". How can I change it?

Thanks

like image 647
Giuseppe Faraci Avatar asked Mar 08 '18 18:03

Giuseppe Faraci


People also ask

How do I change the title on my ionic app?

Check your "index. html" file in the src folder. You would see the "title" html tag. Change it there and it would reflect.

How do you add a header in ionic?

Adding Header If you want to create a header, you need to add bar-header after your main bar class. Open your www/index. html file and add the header class inside your body tag. We are adding a header to the index.

How do you change the color of an ion title?

You can change the background color of the toolbar with the standard title by setting the --background CSS variable on ion-toolbar . This will give the effect of the header changing color as you collapse the large title.


1 Answers

Check your "index.html" file in the src folder. You would see the "title" html tag. Change it there and it would reflect.

like image 159
Toby Okeke Avatar answered Nov 02 '22 23:11

Toby Okeke