TypeError: Cannot read property '__cleanup' of null


#1

Hi,
I have a problem with $ionicModal into a directive in Ionic v1.0.0-beta.12: if I create a modal in a directive link function, when the ui-router state changes appears the error:

TypeError: Cannot read property '__cleanup' of null

This code was working in v1.0.0-beta.11, but doesn’t work in v1.0.0-beta.12.

Thanks!


#2

Hello
I am facing the same issue.

Does anyone have an update on this?

Cheers


#3

Related issue on Github

Possible causes:

a scope cannot be destroyed twice:

  • Trying to listen to an event on a child scope of an already destroyed
    scope throws
  • Trying to deregister an event on a child scope of an
    already destroyed scope throws

#4

Is there any update or progress at all on this issue? This error crops up on almost every state transition and every tab-change in my app. I am not sure if I am using it wrong or whether this is a bug in ionic. Any help is much appreciated.

Many thanks.