{"id":20340886,"url":"https://github.com/nbaua/nglazyloadedcomponent","last_synced_at":"2026-05-08T09:34:46.340Z","repository":{"id":120255407,"uuid":"292279131","full_name":"nbaua/NgLazyLoadedComponent","owner":"nbaua","description":"Angular 10 Lazy Loaded Components Demo","archived":false,"fork":false,"pushed_at":"2020-09-02T13:07:01.000Z","size":574,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-03T04:41:30.836Z","etag":null,"topics":["angular","javascript","lazy-components","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/nbaua/NgLazyLoadedComponent","language":"JavaScript","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/nbaua.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":"2020-09-02T12:39:20.000Z","updated_at":"2021-02-24T14:51:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"1150b9e0-4d14-444b-b3bf-b0be8dc9eee4","html_url":"https://github.com/nbaua/NgLazyLoadedComponent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nbaua/NgLazyLoadedComponent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaua%2FNgLazyLoadedComponent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaua%2FNgLazyLoadedComponent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaua%2FNgLazyLoadedComponent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaua%2FNgLazyLoadedComponent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nbaua","download_url":"https://codeload.github.com/nbaua/NgLazyLoadedComponent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nbaua%2FNgLazyLoadedComponent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32775078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"ssl_error","status_checked_at":"2026-05-08T08:22:45.650Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","javascript","lazy-components","typescript"],"created_at":"2024-11-14T21:24:31.312Z","updated_at":"2026-05-08T09:34:46.320Z","avatar_url":"https://github.com/nbaua.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular Lazy `Components`\n\n### This example shows how components are Lazy loaded or on-demand.\n\n- Pros :\n  - Improves application loading time.\n  - Resources are not eagerly loaded results in saved server bandwidth.\n- Cons :\n  - Components do not work in same fashion as lazy loaded modules.\n  - Module injections and data sharing between two components need component references to be used.\n\n## TIP\n\nDo not reference the component in the App Module as otherwise they will be eagerly loaded.\n\n\u003e Use the following command to generate the component\n\n```\nng g c lazy-component --flat --skip-import --skip-selector --skipTests\n\n```\n\n\u003e To use the modules in the lazy components, need to create a module class, as under.\n\n```\n@NgModule({\n  declarations: [LazyComponent],\n  imports: [CommonModule],\n})\nclass LazyComponentModule {}\n```\n\n`Note that, this module is not exported. As this is self consumed. For now this is the hack to be used. Hopefully Ivy team resolves this issue soon.`\n\n\n\n### Some Action\n\n`Initial State`\n\n![Initial State](https://github.com/nbaua/NgLazyLoadedComponent/blob/master/screenshots/ss-1.png) \n\n`Lazy Loaded Component 1`\n\n![Lazy Loaded Component 1](https://github.com/nbaua/NgLazyLoadedComponent/blob/master/screenshots/ss-2.png) \n\n`Lazy Loaded Component 2`\n\n![Lazy Loaded Component 2](https://github.com/nbaua/NgLazyLoadedComponent/blob/master/screenshots/ss-3.png) \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbaua%2Fnglazyloadedcomponent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnbaua%2Fnglazyloadedcomponent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnbaua%2Fnglazyloadedcomponent/lists"}