angular 6 ionic 4 default components not registered

Issue

I’m working on upgrading my Ionic App to Ionic 4 (pre-release) and Angular 6. I have a component which uses some of the ionic’s components but they seem to not be registered. I’ve created a new project and I’m using the Tabs Start, My Html looks like so:

<ion-header>
  <ion-navbar align-title="center">
     <ion-title>Home</ion-title
  </ion-navbar>
</ion-header>

I changed the home page to use the ion-navbar but now I’m getting an error:

ERROR Error: Uncaught (in promise): Error: Template parse errors:
‘ion-navbar’ is not a known element

Has the nav-bar been removed from Ionic?

Solution

I’m sure they’ll update the docs when v4 is release but Incase anyone is wondering the navbar has been removed, they suggest just using the toolbar for now.

<ion-toolbar>
  <ion-buttons slot="start">
    <ion-back-button></ion-back-button>
  </ion-buttons>
  <ion-title>My Navigation Bar</ion-title>
</ion-toolbar>

More info for v4 is Here

Answered By – johnny 5

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published