ionicPopup not a function?


I’ve got a really weird bug where on an app ionicPopup none of the elements are defined, the same code works in other apps fine. I’ve tried replacing the whole lib folder but to no avail.

ionic.bundle.js:21157 TypeError: $ionicPopup.alert is not a function
at new ViewCompanyCtrl (viewcompanycontrollers.js:12)
at invoke (ionic.bundle.js:13277)
at Object.instantiate (ionic.bundle.js:13285)
at ionic.bundle.js:17841
at self.appendViewElement (ionic.bundle.js:52255)
at Object.render (ionic.bundle.js:50449)
at Object.init (ionic.bundle.js:50369)
at self.render (ionic.bundle.js:52115)
at self.register (ionic.bundle.js:52073)
at updateView (ionic.bundle.js:57485)

Even with just the basic alert:

     title: 'Don\'t eat that!',
     template: 'It might taste good'

I’ve got the $ionicPopup in the controller call

Any ideas?


Have you injected $ionicPopup in your controller defination? If not first inject inject it. It should work.


Hi Sorry, i put the wrong error in. Updated it now


can you post the controller definition code or codepen it ? Then I can solve your problem


please put the complete code of your controller…