Load Data On Init

Dropdown load data on init feature can be uses to take over the control of data binding when on component initialization. If this configuration is set to false, data won't be loaded as expected and user must provide their own way of data loading mechanism by explicitly.

What You Will See

import { Component } from '@angular/core';

import { ExampleData } from 'helper-models';

import { DataFetchService } from 'helper-services';

  selector: 'app-load-data-on-init-usage',
  templateUrl: './load-data-on-init-usage.component.html'
export class LoadDataOnInitUsageComponent {
  public items: ExampleData[];

  constructor(private dataFetchService: DataFetchService) {
    this.items = this.dataFetchService.fetchStaticData();

Basic Usage

For enable/disable the data load on init configuration, simply bind a specific boolean value into ng-dropdown. the default value for this configuration is true.

Item Display
Item Selection
API Doc for Dropdown Load Data On Init