René's URL Explorer Experiment


Title: UrlMatcher as a service · Issue #17145 · angular/angular · GitHub

Open Graph Title: UrlMatcher as a service · Issue #17145 · angular/angular

X Title: UrlMatcher as a service · Issue #17145 · angular/angular

Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/an...

Open Graph Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request...

X Description: I'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not su...

Opengraph URL: https://github.com/angular/angular/issues/17145

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"UrlMatcher as a service","articleBody":"\u003c!--\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING\n-->\n\n**I'm submitting a ...**  (check one with \"x\")\n```\n[ ] bug report => search github for a similar issue or PR before submitting\n[x] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\nOnly a function can be set as the `urlMatcher` of a route.\n\n```\nconst routes = [{\n    urlMatcher: (segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route) => {\n        /* Do stuff */\n    },\n    component: MyComponent,\n}]\n```\n\n**Expected behavior**\nA DI-resolved service or function can be set as the `urlMatcher` allowing for further injection. I'd expect this to work in an identical way to how the resolver properties can either be services that implement the `Resolve\u003cT>` interface OR can be an inline `resolve()` function.\n\n```\nconst routes = [{\n    urlMatcher: MyUrlMatcherService,\n    component: InterruptComponent,\n},\n{\n    path: \":id\",\n    component: ListComponent, /* Contains a \u003crouter-outlet> for routing children */ \n    children: [ /*children with sub-paths for deep linking */ ]\n}];\n\n@Injectable()\nexport class MyUrlMatcherService {\n    constructor(myStateService:MyStateService){}\n\n    matchUrl(segments: UrlSegment[], segmentGroup: UrlSegmentGroup, route: Route):UrlMatchResult {\n        if (!this.myStateService.isInterrupt) return null;\n        /* Do matching stuff */\n    }\n}\n```\n\n**Minimal reproduction of the problem with instructions**\nN/A\n\n**What is the motivation / use case for changing the behavior?**\nMy use case is that `InterruptComponent` should resolve if some system state (managed by a service) is currently true. If not, I want to skip this route an let other routes attempt matching. In my case I want to greedily consume the entire sub-path and display a specific component, but only in certain circumstances.\n\n**Please tell us about your environment:** \nN/A\n\n* **Angular version:** 4.X\n* **Browser:** N/A\n* **Language:** TypeScript 2.2+ \n* **Node (for AoT issues):** N/A","author":{"url":"https://github.com/PleasantD","@type":"Person","name":"PleasantD"},"datePublished":"2017-05-31T20:13:40Z","url":"https://github.com/angular/angular/issues/17145"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:09bf9047-0180-8167-3bbc-1a37075a1ecb
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAEA0:2E124E:7AC6A4:9E27B7:6B00E812
html-safe-nonceed3bb3e406f06cc0b9e32a4dcddfd77c65510faa0e1ad779f427a72475a53c67
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUEwOjJFMTI0RTo3QUM2QTQ6OUUyN0I3OjZCMDBFODEyIiwidmlzaXRvcl9pZCI6IjQ3MjAzNjUxNDI1MzYxNTMxMDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd5a1dd67c7c05e577a61b583a8c1468e2a1d059263c8ebcbfc97e8081b39d08e
hovercard-subject-tagissue:232681968
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/17145/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2108caa46d3b844ea1f584159e70b4335e9ee2a4552ac56e375c3b17840fd99c/angular/angular/issues/17145
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2108caa46d3b844ea1f584159e70b4335e9ee2a4552ac56e375c3b17840fd99c/angular/angular/issues/17145
og:image:altI'm submitting a ... (check one with "x") [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamePleasantD
hostnamegithub.com
expected-hostnamegithub.com
None27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release624179fb8b88d26ba5bba08894eb60a1c5a1d93d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/17145#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F17145
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F17145
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular
Reloadhttps://github.com/angular/angular/issues/17145
Reloadhttps://github.com/angular/angular/issues/17145
Reloadhttps://github.com/angular/angular/issues/17145
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests140 (140)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/17145
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/17145
UrlMatcher as a servicehttps://github.com/angular/angular/issues/17145#top
https://github.com/atscott
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22P3%22
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
featureLabel used to distinguish feature request from other issueshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22feature%22
feature: under considerationFeature request for which voting has completed and the request is now under considerationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22feature%3A%20under%20consideration%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/PleasantD
PleasantDhttps://github.com/PleasantD
on May 31, 2017https://github.com/angular/angular/issues/17145#issue-232681968
Nexthttps://github.com/angular/angular/issues/17145?timeline_page=1
PleasantDhttps://github.com/PleasantD
on May 31, 2017https://github.com/angular/angular/issues/17145#event-1104880759
vicbhttps://github.com/vicb
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
featureLabel used to distinguish feature request from other issueshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22feature%22
on May 31, 2017https://github.com/angular/angular/issues/17145#event-1105088859
https://github.com/Dok11
Dok11https://github.com/Dok11
on Sep 7, 2017https://github.com/angular/angular/issues/17145#issuecomment-327873175
ngbothttps://github.com/apps/ngbot
Backloghttps://github.com/angular/angular/milestone/82
on Jan 23, 2018https://github.com/angular/angular/issues/17145#event-1437581744
https://github.com/MatissJanis
MatissJanishttps://github.com/MatissJanis
on Mar 28, 2018https://github.com/angular/angular/issues/17145#issuecomment-376810248
https://github.com/skorenb
skorenbhttps://github.com/skorenb
on Jun 18, 2018https://github.com/angular/angular/issues/17145#issuecomment-398035382
https://github.com/Dok11
Dok11https://github.com/Dok11
on Jun 18, 2018https://github.com/angular/angular/issues/17145#issuecomment-398036690
@KorenBhttps://github.com/KorenB
https://github.com/skorenb
skorenbhttps://github.com/skorenb
on Jun 19, 2018https://github.com/angular/angular/issues/17145#issuecomment-398314810
@Dok11https://github.com/Dok11
https://github.com/adrigardi90
adrigardi90https://github.com/adrigardi90
on Jul 11, 2018https://github.com/angular/angular/issues/17145#issuecomment-404320443
https://github.com/EddyP23
EddyP23https://github.com/EddyP23
on Aug 30, 2018https://github.com/angular/angular/issues/17145#issuecomment-417205137
@KorenBhttps://github.com/KorenB
https://github.com/EddyP23
EddyP23https://github.com/EddyP23
on Aug 30, 2018https://github.com/angular/angular/issues/17145#issuecomment-417211888
https://github.com/amandabot
amandabothttps://github.com/amandabot
on Aug 30, 2018https://github.com/angular/angular/issues/17145#issuecomment-417365812
@EddyP23https://github.com/EddyP23
https://github.com/joselcvarela
joselcvarelahttps://github.com/joselcvarela
on Aug 7, 2019https://github.com/angular/angular/issues/17145#issuecomment-519155428
https://github.com/SachinShekhar
SachinShekharhttps://github.com/SachinShekhar
on Jan 1, 2020https://github.com/angular/angular/issues/17145#issuecomment-570061233
https://github.com/krokofant
krokofanthttps://github.com/krokofant
on Oct 18, 2021https://github.com/angular/angular/issues/17145#issuecomment-946220310
@atscotthttps://github.com/atscott
https://github.com/OysteinAmundsen
OysteinAmundsenhttps://github.com/OysteinAmundsen
on Nov 26, 2021https://github.com/angular/angular/issues/17145#issuecomment-979752174
jessicajaniukhttps://github.com/jessicajaniuk
atscotthttps://github.com/atscott
on Feb 15, 2022https://github.com/angular/angular/issues/17145#event-6071238364
atscotthttps://github.com/atscott
on Jun 10, 2022https://github.com/angular/angular/issues/17145#event-6789231800
feat(router): Add CanMatch guard to control whether a Route should matchhttps://github.com/atscott/angular/commit/a99727f57c560868de06522de932ca1b309aeb1f
https://docs.github.com/articles/closing-issues-via-commit-messages
a99727fhttps://github.com/atscott/angular/commit/a99727f57c560868de06522de932ca1b309aeb1f
jessicajaniukhttps://github.com/jessicajaniuk
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
de058bbhttps://github.com/angular/angular/commit/de058bba9979f68de2320118b537e6be4dbb888d
on Jun 13, 2022https://github.com/angular/angular/issues/17145#event-6799794867
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Jul 14, 2022https://github.com/angular/angular/issues/17145#issuecomment-1184626175
automatic conversation locking policyhttps://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Jul 14, 2022https://github.com/angular/angular/issues/17145#event-6995546484
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/17145
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/17145
atscotthttps://github.com/atscott
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22P3%22
area: routerhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20router%22
featureLabel used to distinguish feature request from other issueshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22feature%22
feature: under considerationFeature request for which voting has completed and the request is now under considerationhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22feature%3A%20under%20consideration%22
BacklogNo due datehttps://github.com/angular/angular/milestone/82
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.