File

feature-libs/organization/administration/components/unit/links/cost-centers/create/unit-cost-center-create.component.ts

Metadata

changeDetection ChangeDetectionStrategy.OnPush
host {
}
providers { provide: CostCenterItemService, useExisting: UnitCostCenterItemService, }
selector cx-org-unit-cost-center-create
templateUrl ./unit-cost-center-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 { CostCenterItemService } from '../../../../cost-center/services/cost-center-item.service';
import { CurrentUnitService } from '../../../services/current-unit.service';
import { UnitCostCenterItemService } from './unit-cost-center-item.service';

@Component({
  selector: 'cx-org-unit-cost-center-create',
  templateUrl: './unit-cost-center-create.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
  host: { class: 'content-wrapper' },
  providers: [
    // we provide a specific version of the `CostCenterItemService` to
    // let the form component work with unit cost centers.
    {
      provide: CostCenterItemService,
      useExisting: UnitCostCenterItemService,
    },
  ],
})
export class UnitCostCenterCreateComponent {
  unitKey$: Observable<string> = this.unitService.key$;
  constructor(protected unitService: CurrentUnitService) {}
}
<cx-org-cost-center-form [unitKey]="unitKey$ | async"></cx-org-cost-center-form>
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""