Skip to content

Commit

Permalink
docs(angular): add example repo for dynamic federation #12958 (#13900)
Browse files Browse the repository at this point in the history
  • Loading branch information
Coly010 committed Dec 19, 2022
1 parent 4e54b1a commit 079753d
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions docs/shared/guides/module-federation/dynamic-mfe-angular.md
Expand Up @@ -189,22 +189,17 @@ First, add `FormsModule` to the `imports` array in your `remote-entry/entry.modu

```ts {% fileName="remote-entry/entry.module.ts" %}
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';

import { RemoteEntryComponent } from './entry.component';
import { NxWelcomeComponent } from './nx-welcome.component';
import { remoteRoutes } from './entry.routes';
import { FormsModule } from '@angular/forms';

@NgModule({
declarations: [RemoteEntryComponent],
imports: [
CommonModule,
FormsModule,
RouterModule.forChild([
{
path: '',
component: RemoteEntryComponent,
},
]),
],
declarations: [RemoteEntryComponent, NxWelcomeComponent],
imports: [CommonModule, FormsModule, RouterModule.forChild(remoteRoutes)],
providers: [],
})
export class RemoteEntryModule {}
Expand Down Expand Up @@ -461,6 +456,8 @@ nx serve dashboard --devRemotes=login

Should result in the same behaviour as before, except that our Dashboard application is waiting until runtime to find out the deployed location of our Login application.

{% github-repository url="https://github.com/Coly010/nx-ng-dyn-fed" /%}

In the next section, we will see how Nx’s generators can be used to automate a lot of this process for us!

---
Expand Down

1 comment on commit 079753d

@vercel
Copy link

@vercel vercel bot commented on 079753d Dec 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.