📝 docs(widget.mdx): add instructions for including Chat Widget in Angular component's view

📝 docs(widget.mdx): provide example code for adding the 'langflow-chat' tag with necessary attributes to include the Chat Widget in the component's view
This commit is contained in:
Cristhian Zanforlin Lousa 2023-07-27 00:11:40 -03:00
commit 0ed7b7cb2a

View file

@ -138,6 +138,19 @@ import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
export class YourModule { }
```
In your Angular project, locate the component that belongs to the module where you added the 'CUSTOM_ELEMENTS_SCHEMA'.
- Inside the template, add the langflow-chat tag to include the Chat Widget in your component's view:
```html
<langflow-chat
chat_inputs='{"your_key":"value"}'
chat_input_field="your_chat_key"
flow_id="your_flow_id"
host_url="langflow_url"
></langflow-chat>
```
Here are some additional notes:
- The CUSTOM_ELEMENTS_SCHEMA is a built-in schema that allows Angular to recognize custom elements.