{"id":21177451,"url":"https://github.com/betsol/angular-input-locker","last_synced_at":"2025-10-26T12:14:37.114Z","repository":{"id":58215319,"uuid":"21424032","full_name":"betsol/angular-input-locker","owner":"betsol","description":"AngularJS module to provide form input locking","archived":false,"fork":false,"pushed_at":"2014-10-29T23:56:27.000Z","size":176,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-19T19:18:29.998Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/betsol.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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":"2014-07-02T12:54:31.000Z","updated_at":"2015-08-23T19:14:12.000Z","dependencies_parsed_at":"2022-09-09T06:02:00.587Z","dependency_job_id":null,"html_url":"https://github.com/betsol/angular-input-locker","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/betsol/angular-input-locker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fangular-input-locker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fangular-input-locker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fangular-input-locker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fangular-input-locker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/betsol","download_url":"https://codeload.github.com/betsol/angular-input-locker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/betsol%2Fangular-input-locker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264504573,"owners_count":23618825,"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":[],"created_at":"2024-11-20T17:16:10.350Z","updated_at":"2025-10-26T12:14:32.091Z","avatar_url":"https://github.com/betsol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-input-locker 1.0.2\n\n## Description\n\nThis module for AngularJS provides you with ability to lock and unlock all inputs on the page.\nThis is a good practice to prevent input modification when form is being processed or URL is changing.\nThere is a way to enable locking and unlocking during route transitions automatically with a single configuration option.\n\n### Features\n\n- Provides service to lock and unlock all input elements on the page\n- Can lock and unlock input elements automatically during route transitions\n- You can customize the selector used to filter input elements\n\n### Demo\n\nFeel free to play with the [Demo][demo].\n\n## Installation\n\n### Dependencies\n\nThis module requires [jQuery][jquery] to work.\n\n### Install library with bower\n\n`bower install --save angular-input-locker`\n\n### Add library to your page\n\n``` html\n\u003cscript type=\"text/javascript\" src=\"angular-input-locker/dist/angular-input-locker.js\"\u003e\u003c/script\u003e\n```\n\nUse minified version: `angular-input-locker.min.js` in production\nand uncompressed version: `angular-input-locker.js` during development/testing.\n\n### Add dependency in your application's module definition\n\n``` javascript\nvar application = angular.module('application', [\n    // ...\n    'ngInputLocker'\n]);\n```\n\n## Usage\n\nBy calling `setLockOnRouteChange(true)` of `inputLockerProvider` you can enable automatic input locking during route transitions.\n\nYou can also change selector that is used to filter input elements by calling `setSelector(newSelector)`.\nAlthough, you don't really need to do this.\nBy default, all input controls on the page will be affected.\n\n**Example #1**\n\n```javascript\nangular.module('project', ['ngRoute', 'ngInputLocker'])\n    .config([\n        '$routeProvider', 'inputLockerProvider',\n        function($routeProvider, inputLockerProvider) {\n            $routeProvider\n                ...\n            ;\n            \n            inputLockerProvider.setLockOnRouteChange(true);\n            \n            inputLockerProvider.setSelector('input[type=\"text\"]');\n        }\n    ])\n;\n```\n\nOr you can manually call `lock()` or `unlock()` methods of `inputLocker` service:\n\n**Example #2**\n\n```javascript\nangular.module('project', ['ngInputLocker'])\n    .controller('SomeCtrl', ['inputLocker', function(inputLocker) {\n        inputLocker.lock();\n        inputLocker.unlock();\n    }])\n;\n```\n\n## API\n\nSee the examples above.\n\n## Feedback\n\nIf you have found a bug or have another issue with the library - please [create an issue][new-issue]\nin this GitHub repository.\n\nIf you have a question - file it with [StackOverflow][so-ask] and send me a\nlink to [s.fomin@betsol.ru][email]. I will be glad to help.\nAlso, please create a [plunk][plunker] to demonstrate the issue if appropriate.\nYou can even fork our [demo plunk][demo].\n\nHave any ideas or propositions? Feel free to contact me by [E-Mail][email].\n\nCheers!\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Slava Fomin II\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n[so-ask]: http://stackoverflow.com/questions/ask?tags=angularjs,javascript\n[email]: mailto:s.fomin@betsol.ru\n[plunker]: http://plnkr.co/\n[new-issue]: https://github.com/betsol/angular-input-locker/issues/new\n[jquery]: http://jquery.com/\n[demo]: http://plnkr.co/edit/Ox4Lo5aDmqlckVt1wZZQ?p=preview\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fangular-input-locker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbetsol%2Fangular-input-locker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbetsol%2Fangular-input-locker/lists"}