{"id":21231607,"url":"https://github.com/piyalidas10/facebook-like-dislike-using-angularjs","last_synced_at":"2025-10-13T09:08:14.998Z","repository":{"id":120845880,"uuid":"95690375","full_name":"piyalidas10/Facebook-Like-Dislike-using-Angularjs","owner":"piyalidas10","description":"Facebook like dislike button using Angularjs","archived":false,"fork":false,"pushed_at":"2017-06-28T16:48:35.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-13T09:08:14.144Z","etag":null,"topics":["angular","angularjs","facebook","facebook-like","like","like-button"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/piyalidas10.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-06-28T16:35:26.000Z","updated_at":"2017-06-28T16:53:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"e48f8c76-a9a0-45d8-b9b0-80bb4e937a2e","html_url":"https://github.com/piyalidas10/Facebook-Like-Dislike-using-Angularjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/piyalidas10/Facebook-Like-Dislike-using-Angularjs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FFacebook-Like-Dislike-using-Angularjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FFacebook-Like-Dislike-using-Angularjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FFacebook-Like-Dislike-using-Angularjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FFacebook-Like-Dislike-using-Angularjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/piyalidas10","download_url":"https://codeload.github.com/piyalidas10/Facebook-Like-Dislike-using-Angularjs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/piyalidas10%2FFacebook-Like-Dislike-using-Angularjs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014483,"owners_count":26085535,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["angular","angularjs","facebook","facebook-like","like","like-button"],"created_at":"2024-11-20T23:47:39.764Z","updated_at":"2025-10-13T09:08:14.993Z","avatar_url":"https://github.com/piyalidas10.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Facebook-Like-Dislike-using-Angularjs\n\nWhen user click on \"Like\" button, $scope.getlike function sets $scope.dislike property to true and $scope.likes is addding by 1. Then btnclass \"btn-primary\" is addded in button class. Again when user click on \"Like\" button, $scope.likes is substracting by 1 because we are getting ($scope.dislike ---- true) from first click.\n\napp.js\n\n    var app = angular.module(\"likeApp\",[]);\n\n    app.controller(\"mainCtrl\",function($scope){\n      $scope.dislike = false;\n      $scope.btnclass = \"\";\n      \n      $scope.getlike=function(){\n      \n        if($scope.dislike==false){\n          $scope.likes += 1;\n          $scope.dislike = true;\n          $scope.btnclass = \"btn-primary\";\n        }\n        else{\n          $scope.likes -= 1;\t\n          $scope.dislike = false;\n          $scope.btnclass = \"\";\n        }\n\n      }\n    });\n    \n    \nHtml code\n        \n       \u003cbutton class=\"btn {{btnclass}}\" ng-click=\"getlike()\" ng-init=\"likes=0;\"\u003e\u003ci class=\"fa fa-thumbs-o-up\"\u003e\u003c/i\u003e Like\u003c/button\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyalidas10%2Ffacebook-like-dislike-using-angularjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpiyalidas10%2Ffacebook-like-dislike-using-angularjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpiyalidas10%2Ffacebook-like-dislike-using-angularjs/lists"}