mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(events): add deprecations (#19103)
This commit is contained in:
@ -7,6 +7,11 @@ export type EventHandler = (...args: any[]) => any;
|
||||
export class Events {
|
||||
private c = new Map<string, EventHandler[]>();
|
||||
|
||||
constructor() {
|
||||
console.warn(`[DEPRECATION][Events]: The Events provider is deprecated and it will be removed in the next major release.
|
||||
- Use "Observables" for a similar pub/sub architecture: https://angular.io/guide/observables
|
||||
- Use "Redux" for advanced state management: https://github.com/angular-redux/platform/tree/master/packages/store`);
|
||||
}
|
||||
/**
|
||||
* Subscribe to an event topic. Events that get posted to that topic will trigger the provided handler.
|
||||
*
|
||||
|
Reference in New Issue
Block a user