@Directivedecorator on a class and specifying a selector. For directives, the selector name must be camelCase and wrapped in square brackets to specify that it is an attribute binding. We're using the
@HostListenerdecorator to listen in on events on the component or element it's attached to. In this case we're watching the
clickevent and passing in the event details which are given by the special
$eventkeyword. Next, we want to attach this directive to the button we created earlier.
window.confirmcall. To take advantage of this new input property, we add another binding to our button.