File

src/lib/sdk.module.ts

Description

Senzing SDK Components Module. Add to your applications module imports array.

Methods

Static forRoot
forRoot(apiConfigFactory?: () => void)

initialize the SenzingSdkModule with an optional factory method that returns a SzRestConfiguration instance. See SzRestConfiguration

Example :
export function SzRestConfigurationFactory() {
return new SzRestConfiguration({ basePath: \"myapiserverhostname.com:8080\", withCredentials: true });
}

SenzingSdkModule.forRoot( SzRestConfigurationFactory )

Parameters :
Name Type Optional
apiConfigFactory function Yes

SDK Module Installation and Usage

Installation

Open up a terminal to your application root and type npm install @senzing/sdk-components-ng --save.

Add to app.module.ts

Now open up your applications main module file, in most cases this will be app.module.ts for projects generated by angular-cli.

Example :
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { SenzingSdkModule } from '@senzing/sdk-components-ng';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    SenzingSdkModule.forRoot()
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Now start up your application and start adding tags or referencing services. The simplest way to test that things are set up correctly is to add the static sz-powered-by tag to your applications html template.

Example :
<sz-powered-by></sz-powered-by>

results matching ""

    No results matching ""