{"id":17957565,"url":"https://github.com/itinance/quasar-vue-router-issue","last_synced_at":"2025-04-03T17:32:19.311Z","repository":{"id":228252953,"uuid":"773501963","full_name":"itinance/quasar-vue-router-issue","owner":"itinance","description":"This example shows a specific issue with vue-router","archived":false,"fork":false,"pushed_at":"2024-03-17T20:42:38.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T06:16:09.445Z","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/itinance.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}},"created_at":"2024-03-17T20:37:34.000Z","updated_at":"2024-03-17T20:41:22.000Z","dependencies_parsed_at":"2024-03-17T22:02:09.825Z","dependency_job_id":null,"html_url":"https://github.com/itinance/quasar-vue-router-issue","commit_stats":null,"previous_names":["itinance/quasar-vue-router-issue"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fquasar-vue-router-issue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fquasar-vue-router-issue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fquasar-vue-router-issue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itinance%2Fquasar-vue-router-issue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itinance","download_url":"https://codeload.github.com/itinance/quasar-vue-router-issue/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247046755,"owners_count":20874716,"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-29T10:55:41.006Z","updated_at":"2025-04-03T17:32:19.280Z","avatar_url":"https://github.com/itinance.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Quasar App (quasar-project)\n\nA Quasar Project\n\n## Install the dependencies\n```bash\nyarn\n# or\nnpm install\n```\n\n### Start the app in development mode (hot-code reloading, error reporting, etc.)\n```bash\nquasar dev\n```\n\n\n#      Explaining the issue with router:\n\nThe IndexPage is encapsulated into the \u003cb\u003eLinkCatcherComponent\u003c/b\u003e.\nThis component listens on the router via \"afterEach\":\n\n\n    import { useRouter } from 'vue-router';\n    const router = useRouter();\n\n    router.afterEach((to, from) =\u003e {\n    console.log('Router to', to);\n    console.log('- from', from);\n\n\nWhile navigating through the Links in the \u003cb\u003eNavComponent\u003c/b\u003e, everything works as expected:\nwe move from Article 1 to Article 2 to Article 3 and back and on every transition, we\nsee the console logs from the LinkCatcherComponent.\n\nHowever, as soon as we press the Button \"go to article with push\", the router logs are happening twice.\nBecause `router.afterEach` will get executed twice.\n\n    const gotoArticle = () =\u003e {\n    router.push({ name: 'article', params: { id: 'goto-test' } });\n\nAfter pressing a third time on the button, the logs from the router-event will happen 3x times with every\nsingle transition from one article to another. Number counting with every next click on the button using `router.push`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fquasar-vue-router-issue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitinance%2Fquasar-vue-router-issue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitinance%2Fquasar-vue-router-issue/lists"}