{"id":18632281,"url":"https://github.com/zurb/angular-tribute","last_synced_at":"2025-10-04T19:18:56.981Z","repository":{"id":57179269,"uuid":"64343782","full_name":"zurb/angular-tribute","owner":"zurb","description":"Angular directive for Tribute.js","archived":false,"fork":false,"pushed_at":"2019-10-04T18:27:25.000Z","size":16,"stargazers_count":10,"open_issues_count":1,"forks_count":5,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-25T10:51:10.764Z","etag":null,"topics":["angular","tribute","zurb"],"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/zurb.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":"2016-07-27T21:44:59.000Z","updated_at":"2020-05-25T18:14:45.000Z","dependencies_parsed_at":"2022-09-14T02:31:24.913Z","dependency_job_id":null,"html_url":"https://github.com/zurb/angular-tribute","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fangular-tribute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fangular-tribute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fangular-tribute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zurb%2Fangular-tribute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zurb","download_url":"https://codeload.github.com/zurb/angular-tribute/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247986854,"owners_count":21028890,"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","tribute","zurb"],"created_at":"2024-11-07T05:11:05.261Z","updated_at":"2025-10-04T19:18:51.905Z","avatar_url":"https://github.com/zurb.png","language":"JavaScript","readme":"# angular-tribute\n\n\u003e An AngularJS 1.5+ wrapper for ZURB's [Tribute](https://github.com/zurb/tribute) library for native @mentions.\n\n## Install\n\n```js\n$ npm install angular-tribute --save\n```\n\n**or** include the UMD build, hosted by [unpkg](https://unpkg.com) in a `\u003cscript\u003e` tag. You will also need to include the main ZURB Tribute library:\n\n```js\n\u003cscript src=\"js/tribute.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"//unpkg.com/angular-tribute\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\n```js\nimport Angular from \"angular\";\nimport AngularTribute from \"angular-tribute\";\n\nangular\n  .module('myApp', [])\n  .directive('angularTribute', AngularTribute)\n```\n\nIn your controller:\n```js\n  $scope.people = [\n    { name: 'Adam',      email: 'adam@email.com' },\n    { name: 'Amalie',    email: 'amalie@email.com', },\n    { name: 'Estefanía', email: 'estefania@email.com', },\n    { name: 'Adrian',    email: 'adrian@email.com', },\n    { name: 'Wladimir',  email: 'wladimir@email.com', },\n    { name: 'Samantha',  email: 'samantha@email.com', },\n    { name: 'Nicole',    email: 'nicole@email.com', },\n    { name: 'Natasha',   email: 'natasha@email.com', },\n    { name: 'Michael',   email: 'michael@email.com', },\n    { name: 'Nicolás',   email: 'nicole@email.com', }\n  ];\n\n  $scope.tributeConfig = {\n    lookup: 'name',\n    fillAttr: 'name'\n  }\n\n  $scope.tributeOnReplaced = function () {\n    console.log('text replaced!');\n  };\n\n  $scope.tributeOnNoMatch = function () {\n    console.log('no match found in collection!');\n  };\n```\n\nAnd in your view you can add:\n```html\n  \u003ctextarea angular-tribute\n    values=\"$ctrl.people\"\n    options=\"$ctrl.tributeConfig\"\n    on-replaced=\"$ctrl.tributeOnReplaced\"\n    on-no-match=\"$ctrl.tributeOnNoMatch\"\n  \u003e\u003c/textarea\u003e\n```\n\n\u003e The `options`, `on-replaced` and `on-no-match` parameters are optional.\n\nThe `values` array should be an array of objects that contain a key and value like so:\n\n```\n[\n  {key: \"Phil Heartman\", value: \"pheartman\"},\n  {key: \"Gordon Ramsey\", value: \"gramsey\"}\n]\n```\n\nYou can modify this structure using the built-in [Tribute options](https://github.com/zurb/tribute#a-collection).\n\n## Events\n\nTribute broadcasts two events — a `tribute-replaced` event, and a `tribute-no-match` event (see docs [here](https://github.com/zurb/tribute#replace-event)). For your convenience, you can bind to these events by passing a function to `on-replaced` or `on-no-match` attributes respectively.\n\n## License\n\nMIT © [ZURB](http://zurb.com)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fangular-tribute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzurb%2Fangular-tribute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzurb%2Fangular-tribute/lists"}