Discussion Forum: Widget Integration

This document will help to use the Discussion-UI library widgets.

Prerequisite:

  1. Discussion-UI library to be setup and running.
    Note: Refer to this wiki for setup: https://project-sunbird.atlassian.net/wiki/spaces/SBDES/pages/2269708311

Steps to use Discussion-UI library widgets:

  1. setup the library

  2. setup the widgets using below steps.

  3. Go to the html page where the widget needs to be integrated.
    Category-Widget: .

<sb-category-widget [config]="discussionConfig"></sb-category-widget>

Tags-Widget:

<sb-tags-widget [config]="discussionConfig"></sb-tags-widget>

4. Now define the input for the widget in the component file.

import { IdiscussionConfig } from '@project-sunbird/discussions-ui-v8' discussionConfig: IdiscussionConfig = { menuOptions: [{ route: 'categories', enable: true }], userName: 'nptest', categories: { result: ["2"] }, }

5.The widget is integrated and u should be able to in the application.