src/app/shared/directives/do-nothing.directive.ts
empty directive
| Selector | [donothing] |
Properties |
|
Methods |
Inputs |
Outputs |
HostBindings |
HostListeners |
Accessors |
constructor()
|
| emptyInput | |
Type : string
|
|
| emptyOutput | |
Type : string
|
|
|
directive output |
|
| style.color |
Type : string
|
|
HostBinding description directive hostBinding |
| 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 directive hostListener
Example :
|
| emptyMethod | ||||||||
emptyMethod(emptyParam: string)
|
||||||||
|
Parameters :
Returns :
string
directive method return |
| ngOnDestroy |
ngOnDestroy()
|
|
Returns :
void
|
| 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 directive hostListener
Example :
Returns :
void
|
| Public submitTriggered |
submitTriggered()
|
|
Returns :
void
|
| Private _emptyAccessor |
Type : string
|
Default value : ''
|
| Private _fullName |
Type : string
|
| color |
Type : string
|
Decorators :
@HostBinding('style.color')
|
|
HostBinding description directive hostBinding |
| emptyProperty |
Type : string
|
Default value : ''
|
|
directive property |
| Protected popover |
Type : string
|
| emptyAccessor | ||||
getemptyAccessor()
|
||||
|
directive accessor
Example :
|
||||
setemptyAccessor(val)
|
||||
|
Parameters :
Returns :
void
|
| fullName | ||||||||
getfullName()
|
||||||||
|
Getter of _fullName
Returns :
string
|
||||||||
setfullName(newName: string)
|
||||||||
|
Setter of _fullName
Parameters :
Returns :
void
|
import { Directive, HostBinding, HostListener, Input, Output } from '@angular/core';
import { DoNothingDirectiveSchema } from './do-nothing-directive.metadata';
/**
* @example
* empty directive
*/
@Directive(DoNothingDirectiveSchema)
export class DoNothingDirective {
protected popover: string;
/**
* @example
* directive property
*/
emptyProperty = '';
/**
* @example
* directive input
*/
@Input() public emptyInput: string;
/**
* @example
* directive accessor
*/
get emptyAccessor() {
return this._emptyAccessor;
}
set emptyAccessor(val) {
this._emptyAccessor = val;
}
private _emptyAccessor = '';
/**
* @example
* directive output
*/
@Output() public emptyOutput: string;
constructor() {
console.log('Do nothing directive');
}
ngOnDestroy() {}
/**
* @param emptyParam directive method param
* @returns directive method return
*/
emptyMethod(emptyParam: string) {
return emptyParam;
}
public submitTriggered() {}
/**
* HostBinding description
* @example
* directive hostBinding
*/
@HostBinding('style.color') color: string;
/**
* HostListener description 1
* @example
* directive hostListener
*/
@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 {}
private _fullName: string;
/**
* Getter of _fullName
* @return {string} _fullName value
*/
get fullName(): string {
return this._fullName;
}
/**
* Setter of _fullName
* @param {string} newName The new name
*/
set fullName(newName: string) {
this._fullName = newName;
}
}