Global custom component

Hey guys,

I have a question.

I coded a custom component - common navigation bar - cause I would like to use this navigation on all pages, cause it will always be the same (desktop application). I currently inject this component on each page like:

File: tab1.module.ts

import { IonicModule } from '@ionic/angular';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Tab1Page } from './';
import { CommonNavbarComponentModule } from '../common-navbar/common-navbar.module';
import { Tab1PageRoutingModule } from './tab1-routing.module';

  imports: [
  declarations: [Tab1Page]
export class Tab1PageModule {}

And on the page ( itself like this:

<app-common-navbar name="Tab 1 page"></app-common-navbar>
      Some content

…but I would like to use it globally. What would be the correct approach and where and how to inject it? Any example available?

Thanks in advance,

Insert the Component in the app.component and declare it in app.module.

The app.component contains the Ionic Router Element so it’s kind of the main page where you can do stuff like this :blush: