I created an internal directive in a module in my project (Angular 8 + Material Design). Following tuto and official doc.
@Directive({
selector: '[button-confirmation]'
})
export class ButtonConfirmationDirective {
@Output('bc-confirm')
confirmAction = new EventEmitter<any>();
@Input('bc-options')
options: Option[] = [...];
constructor(
private el: ElementRef,
private confirmationService: ConfirmationService
) { }
@HostListener('mouseup') onMouseUp() {
this.confirmationService.displayConfirm(this.el, this.options, this.confirmAction);
}
}
Run Code Online (Sandbox Code Playgroud)
Ok, it's work. BUT, when i create an external library and move my directive (with components, services, ...) i got the error : …
angular-directive angular-material angular-module angular angular-library