File

feature-libs/organization/administration/components/unit/links/children/create/unit-child-create.component.ts

Metadata

changeDetection ChangeDetectionStrategy.OnPush
host {
}
providers { provide: UnitItemService, useExisting: UnitChildItemService, }
selector cx-org-unit-child-create
templateUrl ./unit-child-create.component.html

Index

Properties

Constructor

constructor(unitService: CurrentUnitService)
Parameters :
Name Type Optional
unitService CurrentUnitService No

Properties

unitKey$
Type : Observable<string>
Default value : this.unitService.key$
import { ChangeDetectionStrategy, Component } from '@angular/core';
import { Observable } from 'rxjs';
import { CurrentUnitService } from '../../../services/current-unit.service';
import { UnitItemService } from '../../../services/unit-item.service';
import { UnitChildItemService } from './unit-child-item.service';

@Component({
  selector: 'cx-org-unit-child-create',
  templateUrl: './unit-child-create.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
  host: { class: 'content-wrapper' },
  providers: [
    // we provide a specific version of the `UnitItemService` to
    // let the form component work with child units.
    {
      provide: UnitItemService,
      useExisting: UnitChildItemService,
    },
  ],
})
export class UnitChildCreateComponent {
  unitKey$: Observable<string> = this.unitService.key$;
  constructor(protected unitService: CurrentUnitService) {}
}
<cx-org-unit-form
  [createChildUnit]="true"
  i18nRoot="orgUnit.children"
></cx-org-unit-form>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""