You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is caused by package @angular/platform-browser
Is this a regression?
No
Description
If I provide my own EventManagerPlugins with multi token EVENT_MANAGER_PLUGINS in a module of my library, order of modules matters - if BrowserModule appears after my module in upmost App module then DomEventsPlugin is injected after my plugins and events never reach my plugins, see this line here:
I believe this is by design, the multi token inject order does matter, but I think we need to add document about this, it seems there is no EVENT_MANAGER_PLUGINS doc now, I will try to add it.
I know it matters, but here, really, all that matters is DomEventsPlugin MUST be the last one. I believe it's best to enforce it with something more reliable than reversing the array. Even Angular's own code with 3 built-in plugins implicitly dependant on this which is not very safe situation in a long run.
I see your point, but in my opinion, DomEventsPlugin is just a normal plugin, I don't think Angular should treat it specially. Otherwise, it breaks the current mechanism of the multi injector. So maybe some doc + linter rule will be a solution for this?
Activity
JiaLiPassion commentedon Jul 3, 2020
I believe this is by design, the
multitoken inject order does matter, but I think we need to add document about this, it seems there is no EVENT_MANAGER_PLUGINS doc now, I will try to add it.waterplea commentedon Jul 3, 2020
I know it matters, but here, really, all that matters is DomEventsPlugin MUST be the last one. I believe it's best to enforce it with something more reliable than reversing the array. Even Angular's own code with 3 built-in plugins implicitly dependant on this which is not very safe situation in a long run.
JiaLiPassion commentedon Jul 4, 2020
I see your point, but in my opinion,
DomEventsPluginis just a normal plugin, I don't think Angular should treat it specially. Otherwise, it breaks the current mechanism of themultiinjector. So maybe some doc + linter rule will be a solution for this?waterplea commentedon Jul 4, 2020
This is reasonable. But then the problem is in DomEventsPlugin, because it is written as a special case, not as a normal plugin.
16 remaining items
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
fix(platform-browser): `DomEventsPlugin` should always be the last pl…
angular-automatic-lock-bot commentedon Mar 20, 2026
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.