@lsportsltd/sec-ng
v6.0.0
Published
> _LSports' Sports Expert Chat widget_
Downloads
13
Readme
@lsportsltd/sec-ng
LSports' Sports Expert Chat widget
This package wraps the native HTML widget element with Angular component.
Usage
Ng Add
You can use ng add
to quickly install and add the widget to your app, it'll detect if it's a standalone or module-based project and set up the widget accordingly.
ng add @lsportsltd/sec-ng
Note: The widget will be added to app.component
Manual
We support both standalone and module-based projects.
If your project still uses angular modules you can import SecModule
,
otherwise you will need to add provideSecInitializer()
in either root providers or lazy-loaded route providers (depends on where you plan to use the component), and import the component directly.
// app.component.ts
import { LSportsSecComponent, Fixture } from '@lsportsltd/sec-ng';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
imports: [LSportsSecComponent],
})
export class AppComponent {
// api token is required in order to use the widget
token: string;
// a list of up to 10 mapped fixtures
fixtures: Fixture[] = [...];
}
<!-- app.component.html -->
<lsports-sec [apiToken]="token" [fixtures]="fixtures"></lsports-sec>