{"id":13660809,"url":"https://github.com/ng-util/lazy","last_synced_at":"2025-04-24T23:30:51.420Z","repository":{"id":65465951,"uuid":"161753460","full_name":"ng-util/lazy","owner":"ng-util","description":"Project transferred to https://github.com/ng-util/ng-util/blob/master/packages/lazy/README.md","archived":true,"fork":false,"pushed_at":"2019-01-29T13:18:21.000Z","size":233,"stargazers_count":11,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-18T21:32:07.758Z","etag":null,"topics":["angular","angular-utility"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ng-util.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-14T08:17:12.000Z","updated_at":"2023-01-28T14:38:28.000Z","dependencies_parsed_at":"2023-01-25T08:45:42.286Z","dependency_job_id":null,"html_url":"https://github.com/ng-util/lazy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-util%2Flazy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-util%2Flazy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-util%2Flazy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ng-util%2Flazy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ng-util","download_url":"https://codeload.github.com/ng-util/lazy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250727471,"owners_count":21477319,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","angular-utility"],"created_at":"2024-08-02T05:01:25.976Z","updated_at":"2025-04-24T23:30:50.823Z","avatar_url":"https://github.com/ng-util.png","language":"TypeScript","readme":"# nu-lazy\n---\n\nLazy load resources for Angular\n\n[![NPM version](https://img.shields.io/npm/v/nu-lazy.svg?style=flat-square)](https://www.npmjs.com/package/nu-lazy)\n[![Build Status](https://img.shields.io/travis/ng-util/lazy/master.svg?style=flat-square)](https://travis-ci.org/ng-util/lazy)\n[![Codecov](https://img.shields.io/codecov/c/github/ng-util/lazy.svg?style=flat-square)](https://codecov.io/gh/ng-util/lazy)\n\n## Demo\n\n- [Live Demo](https://cipchk.github.io/nu-lazy/)\n- [Stackblitz](https://stackblitz.com/edit/nu-lazy)\n\n## Install\n\n[![nu-lazy](https://nodei.co/npm/nu-lazy.png)](https://npmjs.org/package/nu-lazy)\n\n## Usage\n\n```typescript\nimport { LazyService } from 'nu-lazy';\n\nexport class AppComponent {\n  constructor(private srv: LazyService) { }\n\n  async loadBS() {\n    const res = await this.srv.load(`https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css`);\n    console.log(`bootstrap`, res);\n  }\n```\n\n## How to use it with:\n\n+ `Stackblitz` sample available [here](https://stackblitz.com/edit/nu-lazy).\n\n## API\n\n| name | type | description |\n| ---- | -- | ----------- |\n| `events` | `Observable\u003cLazyResult[]\u003e` | Events change callback |\n| `clear()` | `void` | Clean all cached items |\n| `load(paths: string ｜ string[])` | `Promise\u003cLazyResult[]\u003e` | Load the specified resources, includes `.js`, `.css` |\n| `loadScript(path: string)` | `Promise\u003cLazyResult\u003e` | Load a script resources |\n| `loadStyle(path: string)` | `Promise\u003cLazyResult\u003e` | Load a style resources |\n\n## License\n\nnu-lazy is released under the MIT license.\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-util%2Flazy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fng-util%2Flazy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fng-util%2Flazy/lists"}