{"id":15640652,"url":"https://github.com/stephenlb/angularjs-chat","last_synced_at":"2025-08-20T08:31:35.710Z","repository":{"id":57178123,"uuid":"48816709","full_name":"stephenlb/angularjs-chat","owner":"stephenlb","description":"AngularJS Chat - Enable chat messaging experiences in your iOS, Android and Web apps. ","archived":false,"fork":false,"pushed_at":"2023-03-13T19:35:03.000Z","size":14745,"stargazers_count":73,"open_issues_count":6,"forks_count":64,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-13T21:42:18.435Z","etag":null,"topics":["angular","chat","socket"],"latest_commit_sha":null,"homepage":"https://stephenlb.github.io/angularjs-chat/","language":null,"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/stephenlb.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-30T19:41:53.000Z","updated_at":"2024-06-21T16:52:39.541Z","dependencies_parsed_at":"2024-06-21T16:52:30.844Z","dependency_job_id":"1c65b1a5-15e0-48d3-9ef9-91ca0a67812e","html_url":"https://github.com/stephenlb/angularjs-chat","commit_stats":{"total_commits":69,"total_committers":3,"mean_commits":23.0,"dds":"0.21739130434782605","last_synced_commit":"dc39bdee80ceb26f5f3ee17dc5615f88c9788cf0"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fangularjs-chat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fangularjs-chat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fangularjs-chat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephenlb%2Fangularjs-chat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephenlb","download_url":"https://codeload.github.com/stephenlb/angularjs-chat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230408170,"owners_count":18220974,"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","chat","socket"],"created_at":"2024-10-03T11:39:15.434Z","updated_at":"2024-12-19T09:06:26.281Z","avatar_url":"https://github.com/stephenlb.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# AngularJS Chat\n\n\u003e [AngularJS Chat](http://angular.chat)\n\nEnable messaging experiences for Web, iOS and Android apps.\nComing Soon AngularJS and the best frameworks Ionic, PubNub, PhoneGap\n\n![AngularJS Chat Website](http://i.imgur.com/Nb6EzZB.png)\n\n## NPM Install\n\n```shell\nnpm install angular-chat\n```\n\n## Bower Install\n\n```shell\nbower install angular-chat\n```\n\n## Include the files\n\nInclude the angular chat files in your template.\n\n```html\n\u003cscript src=\"bower_components/angular/angular.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/rltm/web/rltm.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"bower_components/angular-chat/angular-chat.js\"\u003e\u003c/script\u003e\n```\n\n## Include the Angular module\n\n```js\nvar chat = angular.module('BasicChat', ['chat']);\n```\n\n## Configure\n\nIn order to use angularjs-chat, you must configure a connection to a realtime \nservice. This library includes rltm.js as a dependency which lets you switch \nbetween realtime service providers like Socket.io and PubNub easily.  We \nrecommend [setting up with PubNub](https://github.com/pubnub/rltm.js#pubnub) \nto get started quickly and scale to infinity.\n\n```js\nangular.module('chat').constant('config', {\n    rltm: {\n        service: \"pubnub\",\n        config: {\n            \"publishKey\": \"demo\",\n            \"subscribeKey\": \"demo\"\n        }\n    }\n});\n```\n\n## Example Controller\n\nThe chat module exposes an object called ```Messages``` which includes\na ```send``` and ```receive``` method. \n\n```js\nchat.controller( 'chat', [ 'Messages', '$scope', function( Messages, $scope ) {\n    // Message Inbox\n    $scope.messages = [];\n    // Receive Messages\n    Messages.receive(function(message) {\n        $scope.messages.push(message);\n    });\n    // Send Messages\n    $scope.send = function() {\n        Messages.send({ \n            data: $scope.textbox \n        });\n    };\n}]);\n```\n\nIn this controller we keep a list of messages in ```$scope.messages``` and \npush a new message every time the ```Messages.receive()``` callback is called.\n\nTo send a message over the Internet, we use the ```Messages.send()``` method\nand attach it to ```$scope.send()```` so we can call bind it to the DOM.\n\n## Create your view\n\nWe use the ```$scope.send()``` method and ```$scope.messages``` variable in \nour view.\n\n```html\n\u003cdiv ng-app=\"BasicChat\"\u003e\n    \u003cdiv ng-controller=\"chat\"\u003e\n        \u003cdiv ng-repeat=\"message in messages\"\u003e\n            \u003cstrong\u003e{{message.user.name}}:\u003c/strong\u003e\n            \u003cspan\u003e{{message.data}}\u003c/span\u003e\n        \u003c/div\u003e\n        \u003cform ng-submit=\"send()\"\u003e\n            \u003cinput ng-model=\"textbox\"\u003e\n        \u003c/form\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### Set User ID\n\nSet some identification for this user.\n\n```js\nMessages.user({ id: MY_USER_ID, name : sillyname() });\n```\n\n### Send to User\n\nSend a message to another user.\n\n```js\nMessages.send({ to: target_user_id, data : message_body });\n```\n\nIf you want random user id's that are transient...  you can publish the LIST \nof users to the \"global\" channel and receive each user who has come online.\n\n# Basic Example\n\nCheck out ```/examples/basic/index.html``` for an example of a chatroom that\nevery visitor can chat in.\n\n# Support Desk (many to one) Example\n\nCheck out ```/examples/support-chat/index.html``` and \n```/examples/support-chat/admin.html``` for an example of a embedded support\ntype chatroom. The page ```index.html``` can only chat with the user on\n```admin.html```. The page ```admin.html``` creates a new instance of a \nchatroom for every new user on ```index.html```.\n\n\n## AngularJS Chat Resources\n\n - [AngularJS Chat Website](http://angular.chat)\n - [AngularJS Chat Documentation](https://github.com/stephenlb/angularjs-chat/wiki/AngularJS-Chat-Module)\n - [AngularJS Chat GitHub](https://github.com/stephenlb/angularjs-chat)\n - [Twitter](https://twitter.com/stephenlb)\n - [Get PubNub API Keys](https://www.pubnub.com/get-started/?medium=sbng2016\u0026source=sbng2016\u0026campaign=sbng2016\u0026keyword=sbangularjs\u0026content=sbng2016)\n - [YouTube](https://www.youtube.com/c/StephenBlum)\n - [LinkedIn](https://www.linkedin.com/in/stephenlb)\n - [Vine](https://vine.co/Stephen.Blum)\n - [G+](https://plus.google.com/+StephenBlum)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fangularjs-chat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephenlb%2Fangularjs-chat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephenlb%2Fangularjs-chat/lists"}