{"id":33091709,"url":"https://github.com/andrewmcgivery/ionic-ion-autoListDivider","last_synced_at":"2025-11-19T12:01:08.565Z","repository":{"id":26864641,"uuid":"30324862","full_name":"andrewmcgivery/ionic-ion-autoListDivider","owner":"andrewmcgivery","description":"Gives a set of directives for automatically adding in list dividers for an ng-repeat. (Works for Alphabetical or by Categories)","archived":false,"fork":false,"pushed_at":"2016-10-31T20:01:36.000Z","size":179,"stargazers_count":75,"open_issues_count":14,"forks_count":20,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-10-31T06:49:00.175Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/andrewmcgivery.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":"2015-02-04T22:30:24.000Z","updated_at":"2024-01-29T14:11:37.000Z","dependencies_parsed_at":"2022-07-17T20:41:20.014Z","dependency_job_id":null,"html_url":"https://github.com/andrewmcgivery/ionic-ion-autoListDivider","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andrewmcgivery/ionic-ion-autoListDivider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmcgivery%2Fionic-ion-autoListDivider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmcgivery%2Fionic-ion-autoListDivider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmcgivery%2Fionic-ion-autoListDivider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmcgivery%2Fionic-ion-autoListDivider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrewmcgivery","download_url":"https://codeload.github.com/andrewmcgivery/ionic-ion-autoListDivider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrewmcgivery%2Fionic-ion-autoListDivider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285240542,"owners_count":27137943,"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-11-19T02:00:05.673Z","response_time":65,"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":[],"created_at":"2025-11-14T18:00:30.356Z","updated_at":"2025-11-19T12:01:08.545Z","avatar_url":"https://github.com/andrewmcgivery.png","language":"JavaScript","funding_links":[],"categories":["And A Bunch More! (I am in the process of sorting these)"],"sub_categories":[],"readme":"# ionic-ion-autoListDivider\nGives a set of directives for automatically adding in list dividers for an ng-repeat. (Works for Alphabetical or by Categories)\n\n# Setup\nYou'll need a list of objects (sorted) and an `ng-repeat`.\n\nImport the script and include the module\n\n```\nangular.module('ionicApp', ['ionic','ionic.ion.autoListDivider'])\n```\n\nAn example sorting function in your controller:\n\n```\nitems.sort(function(a,b){\n      var textA = a.user.name.first.toUpperCase();\n      var textB = b.user.name.first.toUpperCase();\n      return (textA \u003c textB) ? -1 : (textA \u003e textB) ? 1 : 0;\n})\n```\n\n# Basic Usage\nTake any `ng-repeat` and add the `auto-list-divider` and the `auto-list-divider-value` attributes. The `auto-list-divider-value` attribute should have the property passed in that you are sorting on.\n\n```\n\u003cion-item auto-list-divider auto-list-divider-value=\"{{item.user.name.first}}\" ng-repeat=\"item in items\"\u003e\n```\n\nBy default, it will divide these items alphabetically by the first letter of the value passed in.\n\n# Example: Default Behavior\nDefault behavior is to take the first letter of the `auto-list-divider-value` passed in and use that to create alphabetical dividers.\n\n```\n\u003cion-list\u003e\n        \u003cion-item auto-list-divider auto-list-divider-value=\"{{item.user.name.first}}\" class=\"item-avatar\" ng-repeat=\"item in items\"\u003e\n\t\u003c/ion-item\u003e\n\u003c/ion-list\u003e\n```\n\n# Example: Custom Divider Function\nA custom function to calculate the divider based on the passed in value can be specified using `auto-divider-function`. This should be the name of a fucction in your controllers scope.\n\n```\n\u003cion-list\u003e\n        \u003cion-item auto-divider auto-divider-value=\"{{item.user.gender}}\" auto-divider-function=\"dividerFunction\" class=\"item-avatar\" ng-repeat=\"item in items\"\u003e\n\t\u003c/ion-item\u003e\n\u003c/ion-list\u003e\n```\n\nIn your controller...\n\n```\n$scope.dividerFunction = function(key){\n  return key;\n}\n```\n\n`key` will be the value passed into `auto-divider-value`.\n\nCodePen of examples: http://codepen.io/andrewmcgivery/pen/XJeQyW\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewmcgivery%2Fionic-ion-autoListDivider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrewmcgivery%2Fionic-ion-autoListDivider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrewmcgivery%2Fionic-ion-autoListDivider/lists"}