src/app/shared/directives/do-nothing.directive.ts
This directive does nothing !
Selector | [donothing] |
Standalone | true |
HostDirectives |
BorderDirective
|
Properties |
Methods |
HostBindings |
HostListeners |
constructor()
|
constructor description |
style.color |
Type : string
|
HostBinding description |
click |
Arguments : '$event'
|
HostListener description 3 |
focus |
Arguments : '$event'
|
HostListener description 3 |
mousedown |
Arguments : '$event.clientX' '$event.clientY'
|
HostListener description 2 |
mouseup |
Arguments : '$event.clientX' '$event.clientY'
|
HostListener description 1 |
onClick | ||||||
onClick(e: Event)
|
||||||
Decorators :
@HostListener('focus', ['$event'])
|
||||||
HostListener description 3
Parameters :
Returns :
void
|
onMousedown |
onMousedown(mouseX: number, mouseY: number)
|
Decorators :
@HostListener('mousedown', ['$event.clientX', '$event.clientY'])
|
HostListener description 2
Returns :
void
|
onMouseup |
onMouseup(mouseX: number, mouseY: number)
|
Decorators :
@HostListener('mouseup', ['$event.clientX', '$event.clientY'])
|
HostListener description 1
Returns :
void
|
color |
Type : string
|
Decorators :
@HostBinding('style.color')
|
HostBinding description |
Protected popover |
Type : string
|
import { Directive, HostBinding, HostListener } from '@angular/core';
import { BorderDirective } from './border.directive';
/**
* This directive does nothing !
*/
@Directive({
selector: '[donothing]',
standalone: true,
hostDirectives: [BorderDirective],
})
export class DoNothingDirective {
protected popover: string;
/**
* constructor description
*/
constructor() {
console.log('Do nothing directive');
}
/**
* HostBinding description
*/
@HostBinding('style.color') color: string;
/**
* HostListener description 1
*/
@HostListener('mouseup', ['$event.clientX', '$event.clientY'])
onMouseup(mouseX: number, mouseY: number): void {}
/**
* HostListener description 2
*/
@HostListener('mousedown', ['$event.clientX', '$event.clientY'])
onMousedown(mouseX: number, mouseY: number): void {}
/**
* HostListener description 3
*/
@HostListener('focus', ['$event'])
@HostListener('click', ['$event'])
onClick(e: Event): void {}
}