{"id":43122837,"url":"https://github.com/iwe7/iwe7-lazy-load","last_synced_at":"2026-01-31T20:03:43.398Z","repository":{"id":57146376,"uuid":"128791657","full_name":"iwe7/iwe7-lazy-load","owner":"iwe7","description":"一个angular【组件】懒加载实现方案","archived":false,"fork":false,"pushed_at":"2018-04-09T15:18:46.000Z","size":14,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-03T22:51:43.638Z","etag":null,"topics":["angular","better","component","lazyload","typescript"],"latest_commit_sha":null,"homepage":null,"language":null,"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/iwe7.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}},"created_at":"2018-04-09T15:16:16.000Z","updated_at":"2019-07-11T10:40:16.000Z","dependencies_parsed_at":"2022-09-06T05:52:06.744Z","dependency_job_id":null,"html_url":"https://github.com/iwe7/iwe7-lazy-load","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iwe7/iwe7-lazy-load","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwe7%2Fiwe7-lazy-load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwe7%2Fiwe7-lazy-load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwe7%2Fiwe7-lazy-load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwe7%2Fiwe7-lazy-load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iwe7","download_url":"https://codeload.github.com/iwe7/iwe7-lazy-load/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iwe7%2Fiwe7-lazy-load/sbom","scorecard":{"id":498838,"data":{"date":"2025-08-11","repo":{"name":"github.com/iwe7/iwe7-lazy-load","commit":"8fb9c87ba60de8e657df93f2bda124c36d30cbdb"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T21:16:51.817Z","repository_id":57146376,"created_at":"2025-08-19T21:16:51.817Z","updated_at":"2025-08-19T21:16:51.817Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28952581,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"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","better","component","lazyload","typescript"],"created_at":"2026-01-31T20:03:24.602Z","updated_at":"2026-01-31T20:03:43.385Z","avatar_url":"https://github.com/iwe7.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"### 给予 angular6.0 实现的一个【组件懒加载功能】\n\n\u003e 我们常常会遇到这样一个问题，当我们使用一个第三方控件库的时候，我们只用到了其中 1 个或某几个组件，会连带一大堆无用的东西，造成体积臃肿不堪。又或者首页用到的组件较多，首页加载速度缓慢，这个时候，我们或许需要加载用户可视范围内用到的组件，随着用户的浏览下拉，我们再去加载这些组件，渐进式加载,渐进式体验，这个时候你或许就用到了本工具所实现的功能。或者一个页面的某些不重要区域，比如第三方广告又或者不重要的元素，可以采用懒加载懒渲染，降低用户首屏等待时间。一切都在用户不知不觉中进行。大大增加用户体验，特别是中大型项目，优化必备！\n\u003e [项目地址github](https://github.com/iwe7/iwe7-lazy-load)\n\n## 安装\n\n```\nyarn add iwe7-lazy-load\n```\n\n## 使用\n\n```ts\nimport { Iwe7LazyLoadModule, LazyComponentsInterface } from 'iwe7-lazy-load';\n// 用到的懒加载组件\nlet lazyComponentsModule: LazyComponentsInterface[] = [\n  {\n    // 组件的selector\n    path: 'lazy-test',\n    // 组件的相对地址\n    loadChildren: './lazy-test/lazy-test.module#LazyTestModule'\n  }\n];\n@NgModule({\n  imports: [Iwe7LazyLoadModule.forRoot(lazyComponentsModule)],\n  // 注意加上这些\n  schemas: [CUSTOM_ELEMENTS_SCHEMA, NO_ERRORS_SCHEMA]\n})\nexport class AppModule {}\n```\n\n```html\n\u003cdiv #ele\u003e\n  \u003clazy-test\u003e\u003c/lazy-test\u003e\n\u003c/div\u003e\n```\n\n```ts\nimport { LazyLoaderService } from 'iwe7-lazy-load';\n\n\n@ViewChild('ele') ele: ElementRef;\nconstructor(\n  public lazyLoader: LazyLoaderService,\n  public view: ViewContainerRef\n) {}\n\nngOnInit() {\n  // 开始渲染懒组件\n  this.lazyLoader.init(this.ele.nativeElement, this.view);\n}\n```\n\n### 定义懒加载组件 demo\n\n```ts\nimport { LazyComponentModuleBase } from 'iwe7-lazy-load';\n@Component({\n  selector: 'lazy-test',\n  template: ` i am a lazy`\n})\nexport class LazyTestComponent {}\n\n@NgModule({\n  imports: [\n    RouterModule.forChild([{\n      path: '',\n      component: LazyTestComponent\n    }])\n  ],\n  declarations: [LazyTestComponent]\n})\nexport class LazyTestModule extends LazyComponentModuleBase {\n  getComponentByName(key: string): Type\u003cany\u003e {\n    return LazyTestComponent;\n  }\n}\n```\n\n### 小结\n\u003e 希望对大家有所帮助\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwe7%2Fiwe7-lazy-load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiwe7%2Fiwe7-lazy-load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiwe7%2Fiwe7-lazy-load/lists"}