theloops-angular-widgets
v0.1.0
Published
This guide provides instructions on how to integrate the `AskWidgetComponent` from the `theloops-angular-widgets` npm package into your Angular project.
Readme
Ask Widget Integration Guide
This guide provides instructions on how to integrate the AskWidgetComponent from the theloops-angular-widgets npm package into your Angular project.
Prerequisites
- Angular CLI installed
- Node.js and npm installed
Installation
First, install the theloops-angular-widgets package via npm:
npm install theloops-angular-widgetsUsage
Importing the AskWidgetComponent into your Angular component:
import { Component,NO_ERRORS_SCHEMA } from '@angular/core';
import { AskWidgetComponent } from 'theloops-angular-widgets';
@Component({
standalone: true,
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
imports: [AskWidgetComponent],
schemas: [NO_ERRORS_SCHEMA]
})
export class AppComponent {
token = '**********';
widgetId = '********';
userId = '********';
userEmail = '********';
constructor() {
}
}Template/Directive Usage
In your Angular component template, include the AskWidgetComponent directive and pass the required properties:
<div>
<lib-ask-widget
[token]="token"
[widgetId]="widgetId"
[userId]="userId"
[userEmail]="userEmail"
></lib-ask-widget>
</div>