{"id":19070242,"url":"https://github.com/bree7e/lesson-services","last_synced_at":"2026-06-18T08:32:27.973Z","repository":{"id":99734456,"uuid":"158732981","full_name":"bree7e/lesson-services","owner":"bree7e","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-23T09:48:58.000Z","size":108,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-22T03:43:14.209Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bree7e.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":"2018-11-22T17:38:02.000Z","updated_at":"2018-11-23T09:48:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"af842225-8b11-482f-aa07-6157670a55a2","html_url":"https://github.com/bree7e/lesson-services","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bree7e/lesson-services","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bree7e%2Flesson-services","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bree7e%2Flesson-services/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bree7e%2Flesson-services/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bree7e%2Flesson-services/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bree7e","download_url":"https://codeload.github.com/bree7e/lesson-services/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bree7e%2Flesson-services/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34483278,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"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":[],"created_at":"2024-11-09T01:17:43.162Z","updated_at":"2026-06-18T08:32:27.946Z","avatar_url":"https://github.com/bree7e.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Сервисы и внедрение зависимостей\n\n```bash\nng g service student\n```\n\nДобавить метод в `src\\app\\student.service.ts`\n```ts\n@Injectable({\n  providedIn: 'root',\n})\nexport class StudentService {\n  constructor() {}\n\n  factorial(n): number {\n    return n !== 1 ? n * this.factorial(n - 1) : 1;\n  }\n}\n```\n\nИспользовать сервис в компоненте `src\\app\\app.component.ts`\n```ts\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css'],\n})\nexport class AppComponent implements OnInit {\n  title = 'lesson4';\n  constructor(private _studentService: StudentService) {}\n\n  ngOnInit() {\n    const a = this._studentService.factorial(12);\n    console.log(a);\n  }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbree7e%2Flesson-services","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbree7e%2Flesson-services","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbree7e%2Flesson-services/lists"}