ReferenceError: $ionicModal is not defined


#1

Ionic looks great and I’m trying to follow along with the tutorial but it’s not that straight forward. I am trying to get the modal working from the tutorial but I get a “ReferenceError: $ionicModal is not defined”.

My index.html code is here: http://pastebin.com/YKxP3rq4 and the app.js code is here: http://pastebin.com/w3FhZ3Ts

Any know what might be causing this? I’ve tried almost everything I can think of with no joy.

Thanks.


#2

You need to inject $ionicModal into your controller:

.controller('LukadukaCtrl', function($scope, $ionicModal) {

#3

:slight_smile: sweet! That fixed it up right up.

Great work you guys are doing. I love the way this thing is shaping up. Anything I can do to help?


#4

Thanks @niiamon :smile: The easiest way you can help is by using Ionic and giving us feedback on any issues you find, things you think could be better, etc.

Even just posting on the forums helps, since people in the future will probably have similar issues.


#5

I will be doing just that. Keep up the good work.

Thanks.