File

core/wizard/wizard-outlet/wizard-outlet.component.ts

Implements

AfterViewInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(wizardComponent: WizardComponent, router: Router, c8yWizardService: WizardService, resolver: ComponentFactoryResolver)
Parameters :
Name Type Optional
wizardComponent WizardComponent No
router Router No
c8yWizardService WizardService No
resolver ComponentFactoryResolver No

Inputs

initialState
Type : any
Default value : {}

The initial state to be assigned to the created component.

Outputs

onSelect
Type : EventEmitter<WizardEntry>

The event that is emitted when the wizard entry is clicked.

Methods

handleEntry
handleEntry(entry: WizardEntry)

Handles the wizard entry, if the entry contains a path, the user will be redirected to it. Otherwise, an attempt will be made to create a dynamic component provided in the entry.

Parameters :
Name Type Optional Default value Description
entry WizardEntry No {} as WizardEntry

Wizard menu entry.

Returns : void
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void

Properties

container
Type : ViewContainerRef
Decorators :
@ViewChild('container', {read: ViewContainerRef})
entries
Type : WizardEntry[]
Default value : []

List of wizard entries.

<ng-container>
  <div class="modal-inner-scroll animated fadeIn" *ngIf="showList">
    <p class="p-16 text-center text-medium separator-bottom">
      <span translate>Select method</span>
    </p>
    <div class="list-group list-group-links" *ngIf="entries.length > 0; else emptyState">
      <button
        *ngFor="let entry of entries"
        type="button"
        class="list-group-item d-flex a-i-center p-t-8 p-b-8"
        (click)="handleEntry(entry)"
      >
        <div class="list-item-icon">
          <i [c8yIcon]="entry.c8yIcon || 'cogs'"></i>
        </div>
        <div title="{{ entry.name | translate }}" class="list-item-body text-truncate">
          {{ entry.name | translate }}
        </div>
      </button>
    </div>

    <ng-template #emptyState>
      <div class="c8y-empty-state">
        <p>{{ 'No options available.' | translate }}</p>
      </div>
    </ng-template>
  </div>
</ng-container>
<template #container [hidden]="showList"></template>

results matching ""

    No results matching ""