{"id":20176348,"url":"https://github.com/mizne/angular-web-store","last_synced_at":"2025-04-10T04:08:04.380Z","repository":{"id":57179406,"uuid":"111687564","full_name":"mizne/angular-web-store","owner":"mizne","description":"An angular module for web storage inspired by https://github.com/cipchk/angular-web-storage","archived":false,"fork":false,"pushed_at":"2024-02-22T06:55:44.000Z","size":1270,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T05:25:34.468Z","etag":null,"topics":["action","angular-module","angular2","angular4","expired","notify","webstorage"],"latest_commit_sha":null,"homepage":"","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/mizne.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}},"created_at":"2017-11-22T13:27:31.000Z","updated_at":"2025-02-11T00:34:33.000Z","dependencies_parsed_at":"2022-09-14T02:10:33.236Z","dependency_job_id":null,"html_url":"https://github.com/mizne/angular-web-store","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/mizne%2Fangular-web-store","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizne%2Fangular-web-store/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizne%2Fangular-web-store/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mizne%2Fangular-web-store/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mizne","download_url":"https://codeload.github.com/mizne/angular-web-store/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247953107,"owners_count":21023947,"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":["action","angular-module","angular2","angular4","expired","notify","webstorage"],"created_at":"2024-11-14T02:08:44.264Z","updated_at":"2025-04-10T04:08:04.352Z","avatar_url":"https://github.com/mizne.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# angular-web-store\n\n## Installation\n\nTo install this library, run:\n\n```bash\n$ npm install angular-web-store --save\n```\n\n## Quick Start\n\nImport the `AngularWebStoreModule` in your module.\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\n\nimport { AppComponent } from './app.component';\n\n// Import your library\nimport { AngularWebStoreModule } from 'angular-web-store';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    AngularWebStoreModule.forRoot()\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\n## Usage\n\n### Using `LocalStorageService` or `SessionStorageService` service.\n\n```typescript\nimport { Component } from '@angular/core'\nimport { LocalStorageService, SessionStorageService } from 'angular-web-store'\n\n@Component({\n    selector: 'demo',\n    templateUrl: './demo.component.html'\n})\nexport class DemoComponent {\n\n    constructor(\n      private local: LocalStorageService, \n      private session: SessionStorageService\n    ) { }\n\n    KEY = 'value';\n    value: any = null;\n\n    set() {\n        this.local.set(this.KEY, { a: 1, now: +new Date }, '4s')\n    }\n\n    remove() {\n        this.local.remove(this.KEY)\n    }\n\n    get() {\n        this.value = this.local.get(this.KEY)\n    }\n\n    clear() {\n        this.local.clear()\n    }\n}\n\n\n## License\n\nMIT © [mizne](mailto:w20054319@126.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmizne%2Fangular-web-store","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmizne%2Fangular-web-store","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmizne%2Fangular-web-store/lists"}