File

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

Description

This directive does nothing !

Metadata

Selector [donothing]

Index

Properties
HostBindings
HostListeners

Constructor

constructor()

constructor description

HostBindings

style.color
style.color: string
Type : string

HostBinding description

HostListeners

click
click()

HostListener description 3

mousedown
Arguments : '$event.clientX' '$event.clientY'
mousedown(mouseX: number, mouseY: number)

HostListener description 2

mouseup
Arguments : '$event.clientX' '$event.clientY'
mouseup(mouseX: number, mouseY: number)

HostListener description 1

Properties

Protected popover
popover: string
Type : string

Do-nothing

import { Directive, HostBinding, HostListener, Input } from '@angular/core';

/**
 * This directive does nothing !
 */
@Directive({
    selector: '[donothing]'
})
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('click')
    onClick(): void {

    }
}

result-matching ""

    No results matching ""