{"id":22683660,"url":"https://github.com/leolanese/angular19-dynamic-component-rendering","last_synced_at":"2026-04-13T22:33:45.428Z","repository":{"id":266097667,"uuid":"897375493","full_name":"leolanese/Angular19-Dynamic-Component-Rendering","owner":"leolanese","description":"Angular19 Dynamic async Component Rendering","archived":false,"fork":false,"pushed_at":"2025-04-13T15:39:57.000Z","size":155,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T03:33:21.889Z","etag":null,"topics":["angular","sass","typescript"],"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/leolanese.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":"2024-12-02T14:22:04.000Z","updated_at":"2025-08-14T09:41:37.000Z","dependencies_parsed_at":"2024-12-02T15:45:37.892Z","dependency_job_id":null,"html_url":"https://github.com/leolanese/Angular19-Dynamic-Component-Rendering","commit_stats":null,"previous_names":["leolanese/angular19-dynamic-component-rendering"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leolanese/Angular19-Dynamic-Component-Rendering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular19-Dynamic-Component-Rendering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular19-Dynamic-Component-Rendering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular19-Dynamic-Component-Rendering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular19-Dynamic-Component-Rendering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leolanese","download_url":"https://codeload.github.com/leolanese/Angular19-Dynamic-Component-Rendering/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular19-Dynamic-Component-Rendering/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31774028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"last_error":"SSL_read: 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","sass","typescript"],"created_at":"2024-12-09T21:12:56.252Z","updated_at":"2026-04-13T22:33:45.420Z","avatar_url":"https://github.com/leolanese.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular19 Dynamic Component Rendering\n\n\u003e Initial bundle size: Incorporated `async dynamically import(s)` for Components Modules at runtime, reducing the initial bundle size. The idea is to lazily load stand-alone Component modules when required, rather than having them eagerly loaded at application startup. Also Component Modules are initialised and removed from memory saving memory\n\n\n## Benefits of Lazy Loading with Cleanup\n\n-Efficient Memory Usage:\nComponents are only in memory while they are rendered. Once removed, memory is freed.\nThis approach prevents unnecessary memory bloat, especially for components that are infrequently used.\n\n- Dynamic Resource Loading:\nLazy-loaded components are only loaded when needed, keeping the initial application size smaller and improving load times.\n\n- Garbage Collection:\nSince Angular removes the references to the component and clears the DOM, JavaScript's garbage collector can automatically clean up memory.\n\n\n## Note ComponentFactoryResolver (Resolvers)\n\n ComponentFactoryResolver was used to dynamically create components at runtime. However, starting from `Angular 13+`, the ComponentFactoryResolver has been deprecated in favor of a more straightforward and modern approach using: `ViewContainerRef.createComponent`\n\n## Usage ComponentFactoryResolver Angular -12\nhttps://medium.com/netanelbasal/dynamically-creating-components-with-angular-a7346f4a982d\n\n## DEMO\n\n![async dynamic component loading](./src/app/images/image.png)\n\n\n---\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.9.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.\n\n---\n\n### :100: \u003ci\u003eThanks!\u003c/i\u003e\n#### Now, don't be an stranger. Let's stay in touch!\n\n\u003ca href=\"https://github.com/leolanese\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cimg src=\"https://scastiel.dev/api/image/leolanese?dark\u0026removeLink\" alt=\"leolanese’s GitHub image\" width=\"600\" height=\"314\" /\u003e\n\u003c/a\u003e\n\n##### :radio_button: Linkedin: \u003ca href=\"https://www.linkedin.com/in/leolanese/\" target=\"_blank\"\u003eLeoLanese\u003c/a\u003e\n##### :radio_button: Twitter: \u003ca href=\"https://twitter.com/LeoLanese\" target=\"_blank\"\u003e@LeoLanese\u003c/a\u003e\n##### :radio_button: DEV.to: \u003ca href=\"https://www.dev.to/leolanese\" target=\"_blank\"\u003eBlog\u003c/a\u003e\n##### :radio_button: Questions / Suggestion / Recommendation: developer@leolanese.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular19-dynamic-component-rendering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleolanese%2Fangular19-dynamic-component-rendering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular19-dynamic-component-rendering/lists"}