{"id":15541990,"url":"https://github.com/dwickern/ember-link-to-wrapper","last_synced_at":"2025-04-23T17:09:58.019Z","repository":{"id":26878628,"uuid":"111577431","full_name":"dwickern/ember-link-to-wrapper","owner":"dwickern","description":"An anchor wrapped in a list item","archived":false,"fork":false,"pushed_at":"2022-12-07T09:37:41.000Z","size":967,"stargazers_count":3,"open_issues_count":15,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T17:09:51.624Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/dwickern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-21T17:00:27.000Z","updated_at":"2020-12-16T17:30:29.000Z","dependencies_parsed_at":"2023-01-14T07:30:14.893Z","dependency_job_id":null,"html_url":"https://github.com/dwickern/ember-link-to-wrapper","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwickern%2Fember-link-to-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwickern%2Fember-link-to-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwickern%2Fember-link-to-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dwickern%2Fember-link-to-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dwickern","download_url":"https://codeload.github.com/dwickern/ember-link-to-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250477812,"owners_count":21437049,"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":[],"created_at":"2024-10-02T12:20:17.598Z","updated_at":"2025-04-23T17:09:58.003Z","avatar_url":"https://github.com/dwickern.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ember-link-to-wrapper\n\n[![npm version](https://badge.fury.io/js/ember-link-to-wrapper.svg)](https://www.npmjs.com/package/ember-link-to-wrapper)\n[![build status](https://travis-ci.org/dwickern/ember-link-to-wrapper.svg?branch=master)](https://travis-ci.org/dwickern/ember-link-to-wrapper)\n\nAn anchor wrapped in a list item. That's all. Useful for working with bootstrap which wants the `active` class on the `\u003cli\u003e`.\n\nBecause [ember-cli-active-link-wrapper](https://github.com/alexspeller/ember-cli-active-link-wrapper) has some issues on ember 2.10+.\n\n## Installation\n\n```\nember install ember-link-to-wrapper\n```\n\n## Usage\n\nUse `{{link-to-wrapper}}` as a drop-in replacement for `{{link-to}}`:\n\n```hbs\n{{#link-to-wrapper \"my-route\"}}\n  Visit my route!\n{{/link-to-wrapper}}\n```\n\nThe template will produce roughly this html:\n\n```html\n\u003cli\u003e\n  \u003ca href=\"/my-route\"\u003e\n    Visit my route!\n  \u003c/a\u003e\n\u003c/li\u003e\n```\n\nWhen the route is active, an `active` class is applied to _both_ elements:\n\n```html\n\u003cli class=\"active\"\u003e\n  \u003ca href=\"/my-route\" class=\"active\"\u003e\n    Visit my route!\n  \u003c/a\u003e\n\u003c/li\u003e\n```\n\n### Query parameters\n\nPass model arguments and query params as usual:\n\n```hbs\n{{#link-to-wrapper \"posts\" postId (query-params expanded=true)}}\n  View post {{postId}}\n{{/link-to-wrapper}}\n```\n\n### Inline form\n\nThe [inline form](https://guides.emberjs.com/v2.15.0/templates/links/#toc_using-link-to-as-an-inline-component) is also supported:\n\n```hbs\n{{link-to-wrapper \"My Route\" \"my-route\"}}\n```\n\n### Custom attributes\n\nUse `linkComponent` to customize the inner anchor element:\n\n```hbs\n{{#link-to-wrapper \"my-route\" class=\"outer\" linkComponent=(component 'link-to' class=\"inner\")}}\n  Visit my route!\n{{/link-to-wrapper}}\n```\n\nProduces roughly this html:\n\n```html\n\u003cli class=\"outer\"\u003e\n  \u003ca href=\"/my-route\" class=\"inner\"\u003e\n    Visit my route!\n  \u003c/a\u003e\n\u003c/li\u003e\n```\n\n## Development\n\n* `git clone \u003crepository-url\u003e` this repository\n* `cd ember-link-to-wrapper`\n* `yarn install`\n\n## Running\n\n* `ember serve`\n* Visit your app at [http://localhost:4200](http://localhost:4200).\n\n## Running Tests\n\n* `yarn test` (Runs `ember try:each` to test your addon against multiple Ember versions)\n* `ember test`\n* `ember test --server`\n\n## Building\n\n* `ember build`\n\nFor more information on using ember-cli, visit [https://ember-cli.com/](https://ember-cli.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwickern%2Fember-link-to-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdwickern%2Fember-link-to-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdwickern%2Fember-link-to-wrapper/lists"}