Skip to content

LoadOntologyComponent

The LoadOntologyComponent provides a unified, reusable layout interface for loading graphical data ontologies (such as HPO or GO) into application contexts. It manages loading states, success indicators, term-capacity counts, and deep documentation linking dynamically via internal template signals.

API Summary

Selector

html
<ui-load-ontology></ui-load-ontology>

Import as

typescript
import { LoadOntologyComponent } from 'ng-hpo-uikit';

Inputs & Outputs

PropertyTypeRequiredDescription
labelSignal<string>YesInline visual label applied to buttons and help links (e.g., "HPO", "GO").
isLoadingSignal<boolean>YesDisables interactions and spins a progress spinner when evaluating files.
isLoadedSignal<boolean>YesDisplays a success checkmark block and metadata tracking strings.
statusMessageSignal<string>YesContext-aware message text explaining current parser operations.
termCountSignal<number | undefined>NoNumber of total parsed hierarchical terms available upon a successful load.
helpUrlSignal<string>NoOverride link to direct manual setup documentation.
helpLinesSignal<string[]>NoCustom micro-instruction string paragraphs shown inside the popover layout.
onLoadOutput<void>Fires a bubble event hook when the primary action button is clicked.

mplementation Context Examples

Standard Human Phenotype Ontology Setup

html
<ui-load-ontology
  label="HPO"
  [isLoading]="statusService.hpoLoading()"
  [isLoaded]="statusService.hpoLoaded()"
  [statusMessage]="hpoMessage()"
  [termCount]="statusService.state().nHpoTerms"
  helpUrl="[https://p2gx.github.io/phenoboard/help/start.html#load-the-hpo](https://p2gx.github.io/phenoboard/help/start.html#load-the-hpo)"
  [helpLines]="['Select the local hp.json file from your machine configuration storage directory.']"
  (onLoad)="loadHpo()">
</ui-load-ontology>

Secondary Gene Ontology (GO) Setup Variant

html
<ui-load-ontology
  label="GO"
  [isLoading]="statusService.goLoading()"
  [isLoaded]="statusService.goLoaded()"
  [statusMessage]="goMessage()"
  [termCount]="statusService.state().nGoTerms"
  helpUrl="[https://p2gx.github.io/phenoboard/help/start.html#load-the-go](https://p2gx.github.io/phenoboard/help/start.html#load-the-go)"
  [helpLines]="['Select the go.json layout descriptor package file.']"
  (onLoad)="loadGo()">
</ui-load-ontology>