File

src/app/shared/directives/do-nothing.directive.ts

Description

This directive does nothing !

Metadata

Index

Properties
Methods
HostBindings
HostListeners

Constructor

constructor()

constructor description

HostBindings

style.color
Type : string

HostBinding description

HostListeners

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

Methods

onClick
onClick(e: Event)
Decorators :
@HostListener('focus', ['$event'])
@HostListener('click', ['$event'])

HostListener description 3

Parameters :
Name Type Optional
e Event No
Returns : void
onMousedown
onMousedown(mouseX: number, mouseY: number)
Decorators :
@HostListener('mousedown', ['$event.clientX', '$event.clientY'])

HostListener description 2

Parameters :
Name Type Optional
mouseX number No
mouseY number No
Returns : void
onMouseup
onMouseup(mouseX: number, mouseY: number)
Decorators :
@HostListener('mouseup', ['$event.clientX', '$event.clientY'])

HostListener description 1

Parameters :
Name Type Optional
mouseX number No
mouseY number No
Returns : void

Properties

color
Type : string
Decorators :
@HostBinding('style.color')

HostBinding description

Protected popover
Type : string

Do-nothing

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 {}
}

results matching ""

    No results matching ""