How to send info through output?

I’m trying to send info through output, but nothing is recived.

I have a list of items (page 1), when an item is clicked a modal is launched, inside this modal there are categories, when one of this categories is clicked I have to send this value to the categories page (page 2).

When categories page will be loaded I have tho show the events who match with the category recived.

If I am right, the launched modal is the son, and the categories page is the father.

On modal html I have something like this:

<ion-row>
 <ion-col size="12">
  <ion-chip class="tab-selected">
   <ion-label (click)="goTo('/tabs/tab2',p.type)">{{p.type}}</ion-label>
  </ion-chip>
 </ion-col>
</ion-row>

The modal component looks like this:

import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
.
.
.
@Output() clickType = new EventEmitter<string>();
.
.
.
goTo(url:string,category:string){
    this.router.navigateByUrl(url);
    console.log(category);
    this.clickType.emit(category);
    this.modalCtrl.dismiss();
  }

Category page html looks like this:

.
.
.
<ion-label class="left_titulo" (clickType)="Click($event)" text-wrap><h2>{{e.event}}</h2></ion-label>
.
.
.

Category page component looks like this:

.
.
.
Click(category:string){
 console.log('Category is: ',category);
}
.
.
.

When I click on the text from the ion-label, nothing is launched, not console.log, not even errors, anything!

Any help?

Thanks.

While you wait for better answers, I’m going to flag two things that strike me as problematic in the design here:

Modals are best used to draw the user’s attention to a short, specific task that needs immediate interaction: either telling them something urgent or getting information that is critical for the app to continue doing what it was doing. To me, that disqualifies any interaction with the navigation system of the app, aside from dismissing oneself. So I think the entire premise of the goTo method is fatally flawed.

Ionic puts a lot of effort into making components behave as users expect them to, and a big part of that is styling, so it’s important to keep components in their proverbial lanes, as it were. Use buttons instead of responding to events on labels.