I’m getting this error when trying to use $ionicModal within a controller. My code is as follows:
.controller('TicketCtrl', function($scope, $routeParams, $http, $ionicModal) { etc...
My module looks like this:
angular.module('snappy.controllers', ['ionic'])
Any ideas on how to fix this?
max
January 21, 2014, 10:04pm
2
Hey @taylorotwell , are you using a new version of Ionic? Also, did you make sure to include the ionic module in your angular app:
angular.module('myApp', ['ionic'])
Upgrading Ionic led to even more issues:
http://d.pr/i/dWbw
max
January 21, 2014, 10:21pm
4
Are you including this?
<script src="js/angular-ui/angular-ui-router.js"></script>
That fixed a few things, but now my “nav” bar doesn’t work. This is how I use the nav:
<nav-page title="ticket.default_subject">
Was working before. Any ideas on that?
@taylorotwell Not knowing exactly how your app is configured, we might struggle to help solve it. Take a look at this example plunker. It shows a typical app with side menu that includes the “states” for routing using the new ui-router.
Here’s another example using router and modal:
I got this error with version 0.9.19. The service Modal was being registered under the name "Modal’ and not $ionicModal. This is fixed in 0.9.20.