0Pricing
Angular Academy · Lesson

Loading Remote Modules

Dynamically load remote micro frontends.

Pulling in a Remote at Runtime

Once a remote exposes a module and the host knows its URL, the host loads it on demand with loadRemoteModule. This is a dynamic import over HTTP: nothing about the remote is bundled into the host build.

loadRemoteModule API

loadRemoteModule takes the remote name (from the manifest) and the exposed key (from the remote's exposes). It returns a promise of that module.

import { loadRemoteModule } from '@angular-architects/native-federation';

const m = await loadRemoteModule('catalog', './Routes');

All lessons in this course

  1. Micro Frontend Architecture
  2. Native Federation for Angular
  3. Sharing Dependencies
  4. Loading Remote Modules
← Back to Angular Academy