{"id":15910476,"url":"https://github.com/nickwinger/ngrxcrosstabcommunication","last_synced_at":"2026-04-30T01:34:51.354Z","repository":{"id":65458315,"uuid":"155350445","full_name":"nickwinger/ngRxCrossTabCommunication","owner":"nickwinger","description":"Simple Browser Cross Tab Communcation for angular2+ using rxjs","archived":false,"fork":false,"pushed_at":"2018-10-30T11:41:01.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T09:07:54.458Z","etag":null,"topics":["angular","browser","communication","crosstab","module","rxjs"],"latest_commit_sha":null,"homepage":null,"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/nickwinger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-30T08:31:13.000Z","updated_at":"2018-10-30T11:41:54.000Z","dependencies_parsed_at":"2023-01-24T13:15:33.439Z","dependency_job_id":null,"html_url":"https://github.com/nickwinger/ngRxCrossTabCommunication","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/nickwinger%2FngRxCrossTabCommunication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickwinger%2FngRxCrossTabCommunication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickwinger%2FngRxCrossTabCommunication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickwinger%2FngRxCrossTabCommunication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickwinger","download_url":"https://codeload.github.com/nickwinger/ngRxCrossTabCommunication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246917807,"owners_count":20854708,"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","browser","communication","crosstab","module","rxjs"],"created_at":"2024-10-06T15:06:36.587Z","updated_at":"2026-04-30T01:34:51.326Z","avatar_url":"https://github.com/nickwinger.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ngrxcrosstabcommunication\n\nJust a simple cross tab communication service für angular2+ using localstorage and rxjs\n\n## Installation\n\nTo install this library, run:\n\n```bash\n$ npm install ngrxcrosstabcommunication --save\n```\n\n## Including in angular\n\ninside your Angular-Module:\n\n```typescript\nimport { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { AppComponent } from './app.component';\n\n// Import CrossTabCommunication library\nimport { NgRxCrossTabCommunicationModule } from 'ngrxcrosstabcommunication';\n\n@NgModule({\n  declarations: [\n    AppComponent\n  ],\n  imports: [\n    BrowserModule,\n    \n    NgRxCrossTabCommunicationModule.forRoot()\n  ],\n  providers: [],\n  bootstrap: [AppComponent]\n})\nexport class AppModule { }\n```\n\nOnce the library is imported, you can use the service like this:\n\n```typescript\nimport {Component} from '@angular/core';\nimport { CrossTabService } from 'ngrxcrosstabcommunication';\n\n@Component() {}\nexport class MyComponent {\n    constructor(crossTabService: CrossTabService) {\n        crossTabService.messages.subscribe(msg =\u003e {\n           console.log('Received message: ' + msg.message); \n        });\n        \n        crossTabService.sendMessage({ message: 'Test message', data: {foo: 'bar'}});\n    }\n}\n```\n\n## Usage / API\n\nThe message objects contains simply a message string and optional data of any type:\n```typescript\ninterface CrossTabMessage {\n    message: string;\n    data?: any;\n}\n```\n\nImport the CrossTabService and subscribe to messages\n```typescript\n    crossTabService.messages.subscribe((msg: CrossTabMessage) =\u003e {\n        \n    });    \n```\n\nImport the CrossTabService and send messages\n```typescript\n    const messageSentToOtherTabs = {\n        message: 'Test', data: { foo: 'bar'}\n    };\n    crossTabService.sendMessage(messageSentToOtherTabs);\n        \n    const messageSentToAllTabs = { // including the current tab\n        message: 'Test', data: 'bar'}\n    };\n    crossTabService.sendMessage(messageSentToAllTabs, true);\n```\n\n## Feedback / Issues / Wishes\nIf you need a feature that is not yet implemented, please just tell me.\n\n\n## License\n\nMIT © [Nick Winger](mailto:nick@bit4bit.at)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickwinger%2Fngrxcrosstabcommunication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickwinger%2Fngrxcrosstabcommunication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickwinger%2Fngrxcrosstabcommunication/lists"}