Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions adev/src/content/reference/errors/NG05101.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# No event manager plugin found for event

This error occurs when Angular tries to set up a listener for an event but none of the registered event manager plugins recognizes the event name.

## Debugging the error

The error message includes the unrecognized event name, which is usually enough to spot the problem. The most common cause is a typo in the event binding:

```html
<!-- 'keyup.ente' is not recognized -->
<input (keyup.ente)="onEnter()" />

<!-- Correct -->
<input (keyup.enter)="onEnter()" />
```

If the event name is intentional and belongs to a third-party plugin (for example, a Hammer.js gesture event), make sure the plugin is provided via the `EVENT_MANAGER_PLUGINS` token:

```typescript
import {ApplicationConfig} from '@angular/core';
import {EVENT_MANAGER_PLUGINS} from '@angular/platform-browser';

export const appConfig: ApplicationConfig = {
providers: [{provide: EVENT_MANAGER_PLUGINS, useClass: MyCustomPlugin, multi: true}],
};
```
2 changes: 1 addition & 1 deletion goldens/public-api/platform-browser/errors.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const enum RuntimeErrorCode {
// (undocumented)
HYDRATION_CONFLICTING_FEATURES = 5001,
// (undocumented)
NO_PLUGIN_FOR_EVENT = 5101,
NO_PLUGIN_FOR_EVENT = -5101,
// (undocumented)
ROOT_NODE_NOT_FOUND = -5104,
// (undocumented)
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-browser/src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const enum RuntimeErrorCode {

// misc errors (5100-5200 range)
BROWSER_MODULE_ALREADY_LOADED = 5100,
NO_PLUGIN_FOR_EVENT = 5101,
NO_PLUGIN_FOR_EVENT = -5101,
UNSUPPORTED_EVENT_TARGET = 5102,
TESTABILITY_NOT_FOUND = 5103,
ROOT_NODE_NOT_FOUND = -5104,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ import type {} from 'zone.js';
const plugin = new FakeEventManagerPlugin(doc, ['dblclick']);
const manager = new EventManager([plugin], new FakeNgZone());
expect(() => manager.addEventListener(element, 'click', null!)).toThrowError(
'NG05101: No event manager plugin found for event click',
'NG05101: No event manager plugin found for event click. Find more at https://next.angular.dev/errors/NG05101',
);
});

Expand Down
Loading