René's URL Explorer Experiment


Title: Unable to use singleton platform injector service shared by all applications on the page · Issue #35429 · angular/angular · GitHub

Open Graph Title: Unable to use singleton platform injector service shared by all applications on the page · Issue #35429 · angular/angular

X Title: Unable to use singleton platform injector service shared by all applications on the page · Issue #35429 · angular/angular

Description: 🐞 bug report Affected Package Using angular 9.0.0 release version. Is this a regression? No Description Unable to create the singleton service and use across multiple angular elements on the same page when it is decorated as providedIn:p...

Open Graph Description: 🐞 bug report Affected Package Using angular 9.0.0 release version. Is this a regression? No Description Unable to create the singleton service and use across multiple angular elements on the same p...

X Description: 🐞 bug report Affected Package Using angular 9.0.0 release version. Is this a regression? No Description Unable to create the singleton service and use across multiple angular elements on the same p...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to use singleton platform injector service shared by all applications on the page","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\u003c!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->\r\n\u003c!-- ✍️edit: --> Using angular 9.0.0 release version.\r\n\r\n\r\n### Is this a regression?\r\n\r\n\u003c!-- Did this behavior use to work in the previous version? -->\r\n\u003c!-- ✍️--> No\r\n\r\n\r\n### Description Unable to create the singleton service and use across multiple angular elements on the same page when it is decorated as  **providedIn:platform**  \r\n\r\n\u003c!-- ✍️--> \r\n\r\nPlease see the below image which summarizes the whole flow;\r\n\r\n![image](https://user-images.githubusercontent.com/6238592/74475396-5dcbd100-4e75-11ea-8363-b13f428dd21b.png)\r\n\r\n\r\n## 🔬 Minimal Reproduction\r\n\u003c!--\r\nPlease create and share minimal reproduction of the issue starting with this template: https://stackblitz.com/fork/angular-issue-repro2\r\n-->\r\n\u003c!-- ✍️--> \r\n\r\n1-Create an angular library project which only have one angular service which uses **providedIn: 'platform'**. The service has two method getTitle and setTitle, which are just getter and setter for the service property named **title**.\r\n2-Create a new angular element app and use the service created in step-1. Create a button(Set Title) in component and call the service's setTile method by passing the value \"Setting title from element1\".\r\n3-Create another new angular element app and use the service created in step-1. Create a button (Get Title) in component and use the getTitle method of the service.\r\n4-Create a new angular container app or in index.html which uses both angular elements created in step 2 & 3. And now press \"Set Title\" and then press \"Get Title\" buttons. \r\n\r\n\r\n\u003c!--\r\nIf StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.\r\nA good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem. \r\nShare the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.\r\n\r\nIssues that don't have enough info and can't be reproduced will be closed.\r\n\r\nYou can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue\r\n-->\r\n\r\n## 🔥 Exception or Error\r\n\u003cpre>No\u003ccode>\r\n\u003c/code>\u003c/pre>\r\n\r\nExpectation: As per documentation, there should be a single instance of the service should exists but two separate instances of the service are created for each element.\r\nPressing \"Get Title\" button should return \"Setting title from element1\" text, but it is returning blank.\r\n\r\nDocumentation Links:\r\nhttps://next.angular.io/api/core/Injectable\r\n\r\nhttps://dev.to/christiankohler/improved-dependeny-injection-with-the-new-providedin-scopes-any-and-platform-30bb\r\n\r\n\u003c!-- If the issue is accompanied by an exception or an error, please share it below: -->\r\n\u003c!-- ✍️-->\r\n\r\n\r\n\r\n\r\n## 🌍  Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\n\u003c!-- run `ng version` and paste output below -->\r\n\u003c!-- ✍️-->\r\n\r\n\u003c/code>\u003c/pre>\r\n\r\n**Anything else relevant?**\r\n\u003c!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->\r\n\r\n\u003c!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->\r\n","author":{"url":"https://github.com/saeed-ahmed","@type":"Person","name":"saeed-ahmed"},"datePublished":"2020-02-13T20:30:48Z","url":"https://github.com/angular/angular/issues/35429"}

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:7e063927-8ecb-360e-a9eb-896aef090028
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA7AE:2AAD2E:143CE23:1AFF45A:6B0130A4
html-safe-nonce669583fd3e1b1ca802fb617942065c7235e1148f04a4836e874b7ac0c9714148
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBN0FFOjJBQUQyRToxNDNDRTIzOjFBRkY0NUE6NkIwMTMwQTQiLCJ2aXNpdG9yX2lkIjoiNTAyMDg0MDYzMzY1NzUzNjY3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace8ad265692a16c757935680575d8756e86d9ad830ed67fbdddb080eef6aae350
hovercard-subject-tagissue:564932989
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/35429/issue_layout
twitter:imagehttps://opengraph.githubassets.com/4aec0394c2e46fbbb58ad06ce2a5216ee32d03efb353ca95edadbf17dae4c9c4/angular/angular/issues/35429
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/4aec0394c2e46fbbb58ad06ce2a5216ee32d03efb353ca95edadbf17dae4c9c4/angular/angular/issues/35429
og:image:alt🐞 bug report Affected Package Using angular 9.0.0 release version. Is this a regression? No Description Unable to create the singleton service and use across multiple angular elements on the same p...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesaeed-ahmed
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/35429#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F35429
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%2F35429
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/35429
Reloadhttps://github.com/angular/angular/issues/35429
Reloadhttps://github.com/angular/angular/issues/35429
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues836 (836)https://github.com/angular/angular/issues
Pull requests141 (141)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/35429
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/35429
Unable to use singleton platform injector service shared by all applications on the pagehttps://github.com/angular/angular/issues/35429#top
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
area: elementsIssues related to Angular Elementshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20elements%22
core: dihttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20di%22
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Backloghttps://github.com/angular/angular/milestone/82
https://github.com/saeed-ahmed
saeed-ahmedhttps://github.com/saeed-ahmed
on Feb 13, 2020https://github.com/angular/angular/issues/35429#issue-564932989
https://user-images.githubusercontent.com/6238592/74475396-5dcbd100-4e75-11ea-8363-b13f428dd21b.png
https://next.angular.io/api/core/Injectablehttps://next.angular.io/api/core/Injectable
https://dev.to/christiankohler/improved-dependeny-injection-with-the-new-providedin-scopes-any-and-platform-30bbhttps://dev.to/christiankohler/improved-dependeny-injection-with-the-new-providedin-scopes-any-and-platform-30bb
Nexthttps://github.com/angular/angular/issues/35429?timeline_page=1
https://github.com/saeed-ahmed
saeed-ahmedhttps://github.com/saeed-ahmed
on Feb 13, 2020https://github.com/angular/angular/issues/35429#issuecomment-585970234
ProvidedInPlatform.ziphttps://github.com/angular/angular/files/4201011/ProvidedInPlatform.zip
AndrewKushnirhttps://github.com/AndrewKushnir
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
on Feb 13, 2020https://github.com/angular/angular/issues/35429#event-3036836623
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Feb 13, 2020https://github.com/angular/angular/issues/35429#event-3036836663
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
area: elementsIssues related to Angular Elementshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20elements%22
on Feb 14, 2020https://github.com/angular/angular/issues/35429#event-3037884417
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Feb 15, 2020https://github.com/angular/angular/issues/35429#issuecomment-586544338
https://user-images.githubusercontent.com/5240450/74580231-142cd480-4fa2-11ea-9d79-e48902d0c786.png
https://github.com/vkvarma
vkvarmahttps://github.com/vkvarma
on Feb 15, 2020https://github.com/angular/angular/issues/35429#issuecomment-586615290
@flash-mehttps://github.com/flash-me
https://github.com/saeed-ahmed
saeed-ahmedhttps://github.com/saeed-ahmed
on Feb 15, 2020https://github.com/angular/angular/issues/35429#issuecomment-586618298
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Feb 16, 2020https://github.com/angular/angular/issues/35429#issuecomment-586655547
@vkvarmahttps://github.com/vkvarma
@saeed-ahmedhttps://github.com/saeed-ahmed
pretty small bundle sizeshttps://twitter.com/simsek_dev/status/1168163228574277639
ng-packagr configurationhttps://github.com/ng-packagr/ng-packagr/blob/master/src/ng-package.schema.json
browserhttps://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/builders.json#L9
@angular-devkit/build-angularhttps://github.com/angular/angular-cli/tree/master/packages/angular_devkit/build_angular
passing a transform objecthttps://github.com/angular/angular-cli/blob/master/packages/angular_devkit/build_angular/src/browser/index.ts#L227
https://user-images.githubusercontent.com/5240450/74597169-91b41b80-505a-11ea-88cc-3e35907d5ba5.gif
Hacking the renderer and injecting JS code that has been loaded from somewherehttps://github.com/angular/angular/issues/35328
https://github.com/vkvarma
vkvarmahttps://github.com/vkvarma
on Feb 16, 2020https://github.com/angular/angular/issues/35429#issuecomment-586726725
@flash-mehttps://github.com/flash-me
@robwormaldhttps://github.com/robwormald
@manfredsteyerhttps://github.com/manfredsteyer
@IgorMinarhttps://github.com/IgorMinar
@StephenFluinhttps://github.com/StephenFluin
https://github.com/saeed-ahmed
saeed-ahmedhttps://github.com/saeed-ahmed
on Feb 19, 2020https://github.com/angular/angular/issues/35429#issuecomment-588299348
@pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
@AndrewKushnirhttps://github.com/AndrewKushnir
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Feb 26, 2020https://github.com/angular/angular/issues/35429#issuecomment-591511415
https://twitter.com/simsek_dev/status/1232700522655862784https://twitter.com/simsek_dev/status/1232700522655862784
https://github.com/flash-me/angular-micro-frontendshttps://github.com/flash-me/angular-micro-frontends
https://github.com/vkvarma
vkvarmahttps://github.com/vkvarma
on Feb 26, 2020https://github.com/angular/angular/issues/35429#issuecomment-591514689
@flash-mehttps://github.com/flash-me
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Mar 1, 2020https://github.com/angular/angular/issues/35429#issuecomment-593143473
18652https://github.com/angular/components/issues/18652
18655https://github.com/angular/components/issues/18655
35765https://github.com/angular/angular/issues/35765
https://gist.github.com/flash-me/f6c01079db0c7830016127d46679b43dhttps://gist.github.com/flash-me/f6c01079db0c7830016127d46679b43d
https://github.com/hebronivy
hebronivyhttps://github.com/hebronivy
on Mar 5, 2020https://github.com/angular/angular/issues/35429#issuecomment-595133923
mheveryhttps://github.com/mhevery
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
on Mar 5, 2020https://github.com/angular/angular/issues/35429#event-3103256722
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
Backloghttps://github.com/angular/angular/milestone/82
on Mar 5, 2020https://github.com/angular/angular/issues/35429#event-3103256794
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Mar 17, 2020https://github.com/angular/angular/issues/35429#issuecomment-600202556
@alan-agius4https://github.com/alan-agius4
@devversionhttps://github.com/devversion
https://github.com/vkvarma
vkvarmahttps://github.com/vkvarma
on Mar 17, 2020https://github.com/angular/angular/issues/35429#issuecomment-600240143
@flash-mehttps://github.com/flash-me
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Mar 18, 2020https://github.com/angular/angular/issues/35429#issuecomment-600559317
@vkvarmahttps://github.com/vkvarma
herehttps://github.com/angular/angular/issues/35429#issuecomment-593143473
@saeed-ahmedhttps://github.com/saeed-ahmed
https://github.com/saeed-ahmed
saeed-ahmedhttps://github.com/saeed-ahmed
on Mar 19, 2020https://github.com/angular/angular/issues/35429#issuecomment-601236290
@flash-mehttps://github.com/flash-me
https://github.com/flash-me
flash-mehttps://github.com/flash-me
on Mar 19, 2020https://github.com/angular/angular/issues/35429#issuecomment-601322087
@angular-clihttps://github.com/angular-cli
herehttps://github.com/angular/angular/issues/35429#issuecomment-586655547
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
core: dihttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20di%22
on Mar 24, 2020https://github.com/angular/angular/issues/35429#event-3158330533
https://github.com/gkalpak
gkalpakhttps://github.com/gkalpak
on Jul 11, 2020https://github.com/angular/angular/issues/35429#issuecomment-657105220
gkalpakhttps://github.com/gkalpak
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jul 11, 2020https://github.com/angular/angular/issues/35429#event-3536482972
https://github.com/tettusud
tettusudhttps://github.com/tettusud
on Jul 16, 2020https://github.com/angular/angular/issues/35429#issuecomment-659335064
@alan-agius4https://github.com/alan-agius4
@devversionhttps://github.com/devversion
36028https://github.com/angular/angular/issues/36028
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Aug 16, 2020https://github.com/angular/angular/issues/35429#issuecomment-674546104
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Aug 16, 2020https://github.com/angular/angular/issues/35429#event-3659432088
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/35429
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/35429
area: coreIssues related to the framework runtimehttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20core%22
area: elementsIssues related to Angular Elementshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20elements%22
core: dihttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22core%3A%20di%22
freq1: lowhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22freq1%3A%20low%22
type: bug/fixhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%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.