projects/k-components/src/lib/components/textblock/textblock.component.ts
changeDetection | ChangeDetectionStrategy.OnPush |
selector | wm-text-block |
styleUrls | ./textblock.component.css |
templateUrl | ./textblock.component.html |
Properties |
|
Methods |
Inputs |
Accessors |
Public
constructor(injectedModel: TextBlockModel)
|
||||||
Parameters :
|
model | |
Type : TextBlockModel
|
|
ngOnInit |
ngOnInit()
|
Returns :
void
|
Public model |
Type : TextBlockModel
|
Decorators :
@Input()
|
text |
gettext()
|
import { Component, Input, Optional } from '@angular/core';
import { ComponentId } from '@mobilize/wms-framework';
import { AngularComponentId } from '@mobilize/wms-framework';
import { TextBlockModel } from '@mobilize/wms-framework';
@Component({
selector: 'wm-text-block',
templateUrl: './textblock.component.html',
styleUrls: ['./textblock.component.css'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
@ComponentId([AngularComponentId.textBlock])
export class SmTextBlock {
@Input()
public model: TextBlockModel;
get text(): string {
return this.model?.Text;
}
public constructor(@Optional() private injectedModel: TextBlockModel) {
this.model = injectedModel;
}
ngOnInit(): void {
this.model = this.model || this.injectedModel;
}
}
<span>{{ text }}</span>
./textblock.component.css
.inner-radio-button-container {
width: inherit;
height: inherit;
background-color: inherit;
}