{"id":17468547,"url":"https://github.com/kamilkisiela/meteor-angular-lazy","last_synced_at":"2026-04-20T10:32:25.224Z","repository":{"id":66075790,"uuid":"94371418","full_name":"kamilkisiela/meteor-angular-lazy","owner":"kamilkisiela","description":"An example of Lazy Loading Angular's NgModules with Meteor 1.5","archived":false,"fork":false,"pushed_at":"2017-06-14T20:57:18.000Z","size":9,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-05-17T02:44:57.245Z","etag":null,"topics":["angular","lazy-loading","meteor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamilkisiela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-14T20:41:32.000Z","updated_at":"2017-07-24T13:16:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"753e1424-9522-4188-8210-debc97213203","html_url":"https://github.com/kamilkisiela/meteor-angular-lazy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kamilkisiela/meteor-angular-lazy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fmeteor-angular-lazy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fmeteor-angular-lazy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fmeteor-angular-lazy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fmeteor-angular-lazy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamilkisiela","download_url":"https://codeload.github.com/kamilkisiela/meteor-angular-lazy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamilkisiela%2Fmeteor-angular-lazy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32043020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","lazy-loading","meteor"],"created_at":"2024-10-18T15:11:52.092Z","updated_at":"2026-04-20T10:32:25.193Z","avatar_url":"https://github.com/kamilkisiela.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lazy Loading Angular's NgModules with Meteor 1.5\n\n## module.dynamicImport\n\nMeteor transpiles `import()` into `module.dynamicImport()`.\n\nSince in TS we can't use `import()` syntax, let's use the transpiled form.\n\n```ts\nimport('./component').then((MyComponent) =\u003e {\n  console.log(MyComponent);\n});\n```\n\n```ts\nmodule.dynamicImport('./component').then((MyComponent) =\u003e {\n  console.log(MyComponent);\n});\n```\n\n## Routing example\n\nUsage of dynamic imports with Angular Router:\n\n```ts\nimport { NgModule, Type } from '@angular/core';\nimport { BrowserModule } from '@angular/platform-browser';\nimport { RouterModule } from '@angular/router';\n\nimport { AppComponent } from './app.component';\nimport { HomeComponent } from './home/home.component';\n\n// function that returns a Promise with a NgModule\nexport function loadBarModule() {\n  return module.dynamicImport('./bar/bar.module').then(({BarModule}) =\u003e BarModule);\n}\n\n@NgModule({\n  imports: [\n    BrowserModule,\n    RouterModule.forRoot([\n      { path: '', redirectTo: 'home', pathMatch: 'full' },\n      { path: 'home', component: HomeComponent },\n      // Angular Router's loadChildren method expects a function that returns a Promise\n      { path: 'foo', loadChildren: loadFooModule }, // use loadBarModule function\n    ])\n  ],\n  declarations: [\n    AppComponent,\n    HomeComponent\n  ],\n  bootstrap: [\n    AppComponent\n  ]\n})\nexport class AppModule {}\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilkisiela%2Fmeteor-angular-lazy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamilkisiela%2Fmeteor-angular-lazy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamilkisiela%2Fmeteor-angular-lazy/lists"}