Component with Output

Can anyone show me an example of how to use output in components?

I tried to follow this example:

But i had no success ;(

We use the @Output decorator on components in the Ionic source. Here is an example of a blur event on the Searchbar component:

Then when you go to use the component:

<ion-searchbar [(ngModel)]="defaultSearch" (blur)="inputBlurred($event)"></ion-searchbar>

And the inputBlurred function will get the Searchbar object.

1 Like

links don’t work, can you paste the examples ?


You need to read the Angular2+ documentarion.