Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

mdCompiler: $onDestroy lifecycle hook never called #11847

@oliversalzburg

Description

@oliversalzburg

Bug

CodePen and steps to reproduce the issue:

CodePen Demo which demonstrates the issue: https://codepen.io/oliversalzburg/pen/rNaPqrL

Detailed Reproduction Steps:

  1. Use $mdPanel to instantiate a controller instance for a dialog.
  2. The $onInit lifecycle hook is invoked by the compiler as expected.
  3. Destroy the panel.

What is the expected behavior?

The $onDestroy lifecycle hook is invoked.

What is the current behavior?

It is not.

What is the use-case or motivation for changing an existing behavior?

These are standard AngularJS lifecycle hooks that should be expected to work on all controller instances. Especially since $onInit is working as expected.

Which versions of AngularJS, Material, OS, and browsers are affected?

  • AngularJS: 1.7
  • AngularJS Material: 1.1.20
  • OS: Windows
  • Browsers: Chrome

Related issues

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions