src/lib/services/pagesRenderer/test/component/parentStub.component.ts
Component used only for testing purposes
changeDetection | ChangeDetectionStrategy.OnPush |
selector | wm-parent |
styleUrls | ./parentStub.component.scss |
templateUrl | ./parentStub.component.html |
Properties |
Inputs |
Accessors |
constructor(ref: ChangeDetectorRef, renderer2: Renderer2, el: ElementRef)
|
||||||||||||
Creates an instance of ParentStubComponent.
Parameters :
|
model | |
Type : any
|
|
Sets the component model. |
_model |
Type : any
|
This stores the component model. |
displayElement |
Type : HTMLElement | undefined
|
The displayElement variable. |
model | ||||||
setmodel(value: any)
|
||||||
Sets the component model.
Parameters :
Returns :
void
|
displayElementPanel | ||||||
setdisplayElementPanel(value: ElementRef)
|
||||||
Sets the displayElement variable.
Parameters :
Returns :
void
|
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ElementRef,
Renderer2,
ViewChild,
Input
} from '@angular/core';
/**
* Component used only for testing purposes
* @export
* @class ParentStubComponent
*/
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
selector: 'wm-parent',
styleUrls: ['./parentStub.component.scss'],
templateUrl: './parentStub.component.html'
})
export class ParentStubComponent {
/**
* Creates an instance of ParentStubComponent.
*
* @param {ChangeDetectorRef} ref
* @param {Renderer2} renderer2
* @param {ElementRef} el
* @memberof ParentStubComponent
*/
constructor(
private ref: ChangeDetectorRef,
private renderer2: Renderer2,
private el: ElementRef
) {}
/**
* The displayElement variable.
*
* @type {HTMLElement}
* @memberof ParentStubComponent
*/
displayElement: HTMLElement | undefined;
/**
* This stores the component model.
*
* @type {*}
* @memberof ParentStubComponent
*/
_model: any;
/**
* Sets the component model.
*
* @param {*} value
* @memberof ParentStubComponent
*/
@Input()
set model(value: any) {
this._model = value;
}
/**
* Sets the displayElement variable.
*
* @param {ElementRef} value
* @memberof ParentStubComponent
*/
@ViewChild('displayElement', { static: false })
set displayElementPanel(value: ElementRef) {
this.displayElement = value != null ? value.nativeElement : null;
}
}
<div #displayElement class="parentclass"></div>
./parentStub.component.scss
.parentclass{
border-style: solid;
}