{"id":48239098,"url":"https://github.com/qoollo/ngx-form-url-saver","last_synced_at":"2026-04-04T20:13:18.787Z","repository":{"id":166479811,"uuid":"615231718","full_name":"qoollo/ngx-form-url-saver","owner":"qoollo","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-07T09:42:49.000Z","size":190,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-28T10:07:54.268Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qoollo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-17T08:35:24.000Z","updated_at":"2024-03-18T10:46:28.000Z","dependencies_parsed_at":"2023-11-30T04:44:12.265Z","dependency_job_id":null,"html_url":"https://github.com/qoollo/ngx-form-url-saver","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.16666666666666663","last_synced_commit":"9417ea54ffefe7d4f53f8be677f321580d910241"},"previous_names":["qoollo/ngx-form-url-saver"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qoollo/ngx-form-url-saver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoollo%2Fngx-form-url-saver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoollo%2Fngx-form-url-saver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoollo%2Fngx-form-url-saver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoollo%2Fngx-form-url-saver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qoollo","download_url":"https://codeload.github.com/qoollo/ngx-form-url-saver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qoollo%2Fngx-form-url-saver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31412133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2026-04-04T20:13:14.824Z","updated_at":"2026-04-04T20:13:18.771Z","avatar_url":"https://github.com/qoollo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :whale: Qoollo ngx-form-url-saver :whale:\n\n| **Package**                                                                                  | **Version**                                                                      | **README**                                                                                   | **Downloads**                                                                                                                   |\n|----------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| [@qoollo/ngx-form-url-saver](https://npmjs.com/package/@qoollo/ngx-form-url-saver) | ![](https://img.shields.io/npm/v/@qoollo/ngx-form-url-saver/latest.svg) | [![](https://img.shields.io/badge/README--green.svg)](projects/form-url-saver-lib/README.md) | [![](https://img.shields.io/npm/dw/@qoollo/ngx-form-url-saver)](https://npmjs.com/package/@qoollo/ngx-form-url-saver) |\n\n## Description\n\nThis `FormUrlSaverDirective` allows writing any form's data to an URL string and restore own state from it.  \nYou no need to write any bolierplate code, it can replace default `[formGroup]` directive in any tempalte.  \n\n## Live demo\n\nTest all directive's features by [live demo](https://qoollo.github.io/ngx-form-url-saver/?firstName=%22Hello%22\u0026secondName=%22World%22)\n\n\n## Usage\nE.g. You want to save your search data after page reloading. \nFor this case you can use this directive.\n\nThis directive extends base Angular [FormGroupDirective](https://angular.io/api/forms/FormGroupDirective), so you can just replace `[formGroup]` to `[ngxFormUrlSaver]`.\n\nComponent code\n\n```ts\npublic form = new FormGroup({\n    searchString: new FormControl(''),\n});\n```\n\nTemplate code\n\nBefore using directive\n```html\n\u003cform [formGroup]=\"form\"\u003e\n    \u003cinput formControlName=\"searchString\"\u003e\n\u003c/form\u003e\n```\n\nAfret using directive\n```html\n\u003cform [ngxFormUrlSaver]=\"form\"\u003e\n    \u003cinput formControlName=\"searchString\"\u003e\n\u003c/form\u003e\n```\n\nWhen form will change it's value, a new query params will push to URL.  \nIn expample the query will be `?searchString=\"...\"`\n\n### **State restoring**\n\nAfter page reloading form will parses all query and restore own state by them.  \nAnd then form will be sync state with URL as always.\n\n## Features\n\n- Allows to set debounce time to query update\n- Can work in two query-parametres creation modes:\n1. 'separated' - All form's fields will write in separate query-params by its names. E.g `?firstName=\"Hello\"\u0026secondName=\"World\"`\n2. 'united' - All form will be write in one query parameter (with name `form` by default). E.g `/?form=%7B\"firstName\":\"\",\"secondName\":\"\"%7D`\n\n## Options\n\n| Option       | Type                     | Default    | Description                                       |                                                                    \n|--------------|--------------------------|------------|---------------------------------------------------|\n| debounceTime | number                   | 500        | Debounce time in ms                               |\n| strategy     | `'united' \\ 'separated'` | `'united'` | Query creation strategy                           |\n| queryKey     | string                   | `'form'`   | Default query parameter for united strategy       |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoollo%2Fngx-form-url-saver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqoollo%2Fngx-form-url-saver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqoollo%2Fngx-form-url-saver/lists"}