How can I let the ion-header-bar title align:center in new version?

Why in the new version, the ion-header-bar title is not the same old version align:center? It’s align-left.

If I want to like the old version, let it align:center, how can I do?

this is my code:

<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<link href="" rel="stylesheet">
<script src=""></script>
<link href="style.css" rel="stylesheet">
<script src="script.js"></script>
<ion-header-bar class="bar-positive">
    <button class="button button-icon ion-navicon">
    <h1 class="title">mytitle</h1>
    <button class="button button-icon ion-grid">

you can navBar.alignTitle

read this$ionicConfigProvider/

1 Like

It worked.
thank you^^

If you are seeing this on an Android device, this is done on purpose. Android style guidelines say that view titles should be left aligned.

navBar.alignTitle(‘center’) works but maybe it could be nice to have a title-center class as we have title-right and title-left.

<h1 class="title title-center">Hello world</h1>