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
- Micro Frontend Architecture
- Native Federation for Angular
- Sharing Dependencies
- Loading Remote Modules