File

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

Implements

AfterViewInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs

Constructor

constructor(router: Router, c8yWizardService: WizardService, viewContainerRef: ViewContainerRef, injector: Injector)
Parameters :
Name Type Optional
router Router No
c8yWizardService WizardService No
viewContainerRef ViewContainerRef No
injector Injector No

Inputs

id
Type : string

The id parameter identifies the particular wizard and can be used to refer to it when hooking wizard entries. Example: "wizardId".

initialState
Type : any
Default value : {}

The initial state to be assigned to the created component.

Outputs

onPath
Type : EventEmitter<string>

The event that is emitted when the URL path is provided.

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
reset
reset()

Resets the wizard to its initial state.

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 ""