mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-24 23:01:57 +08:00
fix(angular): always dispatch lifecycle events
This commit is contained in:
@ -106,7 +106,7 @@ const LIFECYCLES = [
|
|||||||
export function bindLifecycleEvents(instance: any, element: HTMLElement) {
|
export function bindLifecycleEvents(instance: any, element: HTMLElement) {
|
||||||
LIFECYCLES.forEach(eventName => {
|
LIFECYCLES.forEach(eventName => {
|
||||||
element.addEventListener(eventName, (ev: any) => {
|
element.addEventListener(eventName, (ev: any) => {
|
||||||
if (typeof instance[eventName] === 'function' && ev.detail) {
|
if (typeof instance[eventName] === 'function') {
|
||||||
instance[eventName](ev.detail);
|
instance[eventName](ev.detail);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user