How to use the @scion/microfrontend-platform.Topics.Applications function in @scion/microfrontend-platform

To help you get started, we’ve selected a few @scion/microfrontend-platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SchweizerischeBundesbahnen / scion-workbench / apps / microfrontend-apps / src / testing-app / outlet / outlet.component.ts View on Github external
constructor(private _sanitizer: DomSanitizer) {
    this.endpoints$ = Beans.get(MessageClient).observe$(Topics.Applications)
      .pipe(
        take(1),
        map((reply: TopicMessage) => {
          const endpoints: AppEndpoint[] = [];
          const applications = reply.body;

          applications.forEach(application => {
            const origin = application.origin;
            const symbolicName = application.symbolicName;

            endpoints.push({url: `${origin}/#/testing-app/publish-message`, label: `Publish messages from 'app-${symbolicName}`});
            endpoints.push({url: `${origin}/#/testing-app/receive-message`, label: `Receive messages in 'app-${symbolicName}`});
            endpoints.push({url: `${origin}/#/testing-app/manage-capabilities`, label: `Manage capabilities for 'app-${symbolicName}`});
            endpoints.push({url: `${origin}/#/testing-app/manage-intents`, label: `Manage intents for 'app-${symbolicName}`});
            endpoints.push({url: `${origin}/#/testing-app/outlets;count=2`, label: 'Include outlet(s) to show microfrontends'});
          });