How to use the @nguniversal/common/ls-routes.lsRoutes function in @nguniversal/common

To help you get started, we’ve selected a few @nguniversal/common 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 angular / universal / modules / common / ls-routes / spec / ls-routes.spec.ts View on Github external
RouterModule.forRoot(routeConfig.map(r => assignComponent(r, MockComponent))),
    ],
    declarations: [MockComponent]
  })
  class MockModule { }
  @NgModule({
    imports: [
      ServerModule,
      MockModule,
      ModuleMapLoaderModule
    ]
  })
  class MockServerModule {}
  const factory = await compiler.compileModuleAsync(MockServerModule);

  return lsRoutes(factory, moduleMap);
}