File

projects/k-components/src/lib/components/textblock/textblock.component.ts

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector wm-text-block
styleUrls ./textblock.component.css
templateUrl ./textblock.component.html

Index

Properties
Methods
Inputs
Accessors

Constructor

Public constructor(injectedModel: TextBlockModel)
Parameters :
Name Type Optional
injectedModel TextBlockModel No

Inputs

model
Type : TextBlockModel

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

Public model
Type : TextBlockModel
Decorators :
@Input()

Accessors

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;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""