Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now run the demo application

Code Block
> npm run demo

Extra steps to do:

  • To enable the close button functionality, which will redirect the user to the page from where he/she has landed into discussion forum:

We need to set the URL from where we are navigating:

Code Block
this.navigationHelperService.setNavigationUrl({url: this.router.url});

Here, we have maintained a service that will store the current URL before navigating to the DF,

Next, as we have subscribed for the events which are emitted from the DF library, there only we need to check for the close event:

Code Block
this.discussionEvents.telemetryEvent.subscribe(event => {
  this.discussionTelemetryService.logTelemetryEvent(event);
  if (_.get(event, 'action') === 'DF_CLOSE' ) {
    this.navigationHelperService.navigateToLastUrl();
  }
});

In the discussion module. we have used the services which will navigate to the previously stored url.