{"id":20101670,"url":"https://github.com/spirosikmd/angular2-focus","last_synced_at":"2025-06-25T02:37:57.990Z","repository":{"id":12265514,"uuid":"71385120","full_name":"spirosikmd/angular2-focus","owner":"spirosikmd","description":"Angular attribute directive that gives focus on an element depending on a given expression 🔎","archived":false,"fork":false,"pushed_at":"2022-12-03T15:40:09.000Z","size":5311,"stargazers_count":21,"open_issues_count":23,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-01T05:12:53.542Z","etag":null,"topics":["angular","angular2","directive","focus"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/spirosikmd.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":"2016-10-19T18:00:52.000Z","updated_at":"2021-11-05T21:09:26.000Z","dependencies_parsed_at":"2023-01-13T20:30:52.152Z","dependency_job_id":null,"html_url":"https://github.com/spirosikmd/angular2-focus","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/spirosikmd/angular2-focus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fangular2-focus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fangular2-focus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fangular2-focus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fangular2-focus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spirosikmd","download_url":"https://codeload.github.com/spirosikmd/angular2-focus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spirosikmd%2Fangular2-focus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261792362,"owners_count":23210303,"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","angular2","directive","focus"],"created_at":"2024-11-13T17:26:13.551Z","updated_at":"2025-06-25T02:37:57.963Z","avatar_url":"https://github.com/spirosikmd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular2-focus\n\nAngular attribute directive that gives focus on an element depending on a given expression.\n\n[![Build Status][build-badge]][build]\n[![version][version-badge]][package]\n[![PRs Welcome][prs-badge]](http://makeapullrequest.com)\n[![All Contributors][all-contributors-badge]](#contributors)\n[![Greenkeeper badge][greenkeeper-badge]](https://greenkeeper.io/)\n\n## Install\n\n`npm install --save angular2-focus`\n\n## Example\n\n```typescript\nimport {NgModule, Component} from '@angular/core';\nimport {FocusModule} from 'angular2-focus';\n\n@Component({\n  template: `\n    \u003cinput type=\"text\" focus=\"true\"\u003e\n  `\n})\nclass AppComponent { }\n\n@NgModule({\n  imports: [FocusModule.forRoot()],\n  declarations: [AppComponent],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\nCheck the [docs](docs) for examples using `@angular/forms` and other third party libraries such as\n`@ng-bootstrap/ng-bootstrap`, to focus elements when e.g. using a modal.\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n| [\u003cimg src=\"https://avatars.githubusercontent.com/u/1057324?v=3\" width=\"100px;\"/\u003e\u003cbr /\u003e\u003csub\u003eSpyros Ioakeimidis\u003c/sub\u003e](http://www.spyros.io)\u003cbr /\u003e💬 [💻](https://github.com/spirosikmd/angular2-focus/commits?author=spirosikmd) [⚠️](https://github.com/spirosikmd/angular2-focus/commits?author=spirosikmd) |\n| :---: |\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification.\nContributions of any kind welcome!\n\n[version-badge]: https://img.shields.io/npm/v/angular2-focus.svg?style=flat-square\n[package]: https://www.npmjs.com/package/angular2-focus\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[build-badge]: https://img.shields.io/travis/spirosikmd/angular2-focus.svg?style=flat-square\n[build]: https://travis-ci.org/spirosikmd/angular2-focus.svg\n[all-contributors-badge]: https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square\n[greenkeeper-badge]: https://badges.greenkeeper.io/spirosikmd/angular2-focus.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspirosikmd%2Fangular2-focus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspirosikmd%2Fangular2-focus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspirosikmd%2Fangular2-focus/lists"}