### File

`src/lib/data-source-loader.ts`

### Extends

`DefinitionLoader`

### Index

###### Methods
Public connect

### Methods

Public connect
`connect(dataSourceIdOrInstanceOrToken: IdOrInstanceOrToken<BaseDataSource<Data>>, viewer: BaseDataSourceViewer, metadata?: Partial<BaseDataSourceMetadata>, injector?: Injector, notFoundValue?: BaseDataSource<Data>, flags?: InjectFlags)`
Defined in src/lib/data-source-loader.ts:20
Type parameters : Data
Parameters :
Name | Type | Optional
dataSourceIdOrInstanceOrToken | `IdOrInstanceOrToken<BaseDataSource<Data>>` | No
viewer | `BaseDataSourceViewer` | No
metadata | `Partial<BaseDataSourceMetadata>` | Yes
injector | `Injector` | Yes
notFoundValue | `BaseDataSource<Data>` | Yes
flags | `InjectFlags` | Yes
Returns : `Observable<Data>`

    import {
      Injectable,
      InjectFlags,
      Injector,
    } from '@angular/core';
    import {
      BaseDataSource,
      BaseDataSourceMetadata,
      BaseDataSourceViewer,
    } from './base.data-source';
    import { Observable } from 'rxjs';
    import {
      DefinitionLoader,
      IdOrInstanceOrToken,
    } from '@rxap/definition';

    @Injectable({ providedIn: 'root' })
    export class DataSourceLoader extends DefinitionLoader {

      public connect<Data>(
        dataSourceIdOrInstanceOrToken: IdOrInstanceOrToken<BaseDataSource<Data>>,
        viewer: BaseDataSourceViewer,
        metadata?: Partial<BaseDataSourceMetadata>,
        injector?: Injector,
        notFoundValue?: BaseDataSource<Data>,
        flags?: InjectFlags,
      ): Observable<Data> {
        return this
          .load(
            dataSourceIdOrInstanceOrToken,
            metadata,
            injector,
            notFoundValue,
            flags,
          )
          .connect(viewer);
      }

    }

# results matching ""

# No results matching ""