File

projects/i-components/src/lib/components/list-box-item/list-box-item.component.ts

Description

Angular Component for the ListBox item Control

Implements

OnInit

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector wm-list-box-item
styleUrls ./list-box-item.component.scss
templateUrl ./list-box-item.component.html

Index

Properties
Methods
Inputs

Constructor

Public constructor(injectedModel: ListBoxItemModel)

Creates an instance of ListBoxItemComponent.

Parameters :
Name Type Optional
injectedModel ListBoxItemModel No

Inputs

model
Type : ListBoxItemModel

Object with ListBoxItem properties and events

Methods

ngOnInit
ngOnInit()

Angular lifecycle hook Initialize model

Returns : void

Properties

Public model
Type : ListBoxItemModel
Decorators :
@Input()

Object with ListBoxItem properties and events

import {
  ChangeDetectionStrategy,
  Component,
  Input,
  OnInit,
  Optional,
} from '@angular/core';
import {
  ListBoxItemModel,
  ComponentId,
  AngularComponentId,
} from '@mobilize/wms-framework';

/**
 * Angular Component for the ListBox item Control
 *
 * @export
 * @class ListBoxItemComponent
 * @implements {OnInit}
 */
@Component({
  selector: 'wm-list-box-item',
  templateUrl: './list-box-item.component.html',
  styleUrls: ['./list-box-item.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
@ComponentId([AngularComponentId.listBoxItem])
export class ListBoxItemComponent implements OnInit {
  /**
   * Object with ListBoxItem properties and events
   *
   * @type {ListBoxItemModel}
   * @memberof ListBoxItemComponent
   */
  @Input()
  public model: ListBoxItemModel;

  /**
   * Creates an instance of ListBoxItemComponent.
   *
   * @param {ListBoxItemModel} injectedModel
   * @memberof ListBoxItemComponent
   */
  public constructor(@Optional() private injectedModel: ListBoxItemModel) {
    this.model = injectedModel;
  }

  /**
   * Angular lifecycle hook
   * Initialize model
   *
   * @memberof ListBoxItemComponent
   */
  ngOnInit(): void {
    this.model = this.model || this.injectedModel || new ListBoxItemModel();
  }
}
<ng-container>
  <span>
    {{ model?.Content }}
  </span>
  <ng-content></ng-content>
</ng-container>

./list-box-item.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""