Angular - 5.7-Assigning an alias to custom events

In the last lesson, you learned how to use @Output to allow our components to listen to your own custom events that you can create with EventEmitter.

Now, just like on @Input, on @Output, you can also assign an alias. As here for blueprintCreated, we will call it bpCreated.

Now, with this, this is the event you can listen to from the outside. So in the component of the app where we’re trying to listen, we now have to rename it as well and listen to bpCreated, which is now, just like @Input, the only event you can listen to regarding this blueprintCreated event.

The other name, blueprintCreated here, will no longer be exposed outside, so now it must be bpCreated. Everything else stays in touch and works as before.