The Ionic Guide

I’m trying to follow the ionic guide but when starting the sample app the left menu is not working, nothing happens when dragging the main view.
I’ve tested on browser, emulator (via genymotion) and on a nexus 7.
In the firefox console I see these lines:

Error: [$injector:modulerr] Failed to instantiate module todo due to:
[$injector:modulerr] Failed to instantiate module ionic due to:
[$injector:modulerr] Failed to instantiate module ionic.service due to:
[$injector:modulerr] Failed to instantiate module ionic.service.view due to:
[$injector:modulerr] Failed to instantiate module ui.router due to:
[$injector:nomod] Module 'ui.router' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.7/$injector/nomod?p0=ui.router
minErr/<@http://localhost:8000/js/angular/angular.js:78 
module/<@http://localhost:8000/js/angular/angular.js:1530
ensure@http://localhost:8000/js/angular/angular.js:1453
module@http://localhost:8000/js/angular/angular.js:1526
loadModules/<@http://localhost:8000/js/angular/angular.js:3616
forEach@http://localhost:8000/js/angular/angular.js:302
loadModules@http://localhost:8000/js/

I’m pretty new to ionic and angular, so sorry if this is trivial …can you help me?
Thanks!

Hello antonio,

seems to be that there is a script tag missing in the documentation. This should work:

<script src="js/ionic.js"></script>
<script src="js/angular/angular.js"></script>
<script src="js/angular/angular-animate.js"></script>
<script src="js/angular/angular-route.js"></script>
<script src="js/angular/angular-touch.js"></script>
<script src="js/angular-ui/angular-ui-router.js"></script>
<script src="js/ionic-angular.js"></script>

There are other quite cool examples, if you look inside the folder \examples\starters\ of the downloaded ionic release.

2 Likes

Thanks, that did it!
However following the guide I hit another problem. I’m trying the modal stuff, after adding buttons to the header bar and modifying the controller as indicated in the “Creating tasks” part of the guide here, Firefox console shows:

"Error: [$injector:unpr] Unknown provider: ModalProvider <- Modal
http://errors.angularjs.org/1.2.7/$injector/unpr?p0=ModalProvider%20%3C-%20Modal
minErr/<@http://localhost:8000/js/angular/angular.js:78
createInjector/providerCache.$injector<@http://localhost:8000/js/angular/angular.js:3540
getService@http://localhost:8000/js/angular/angular.js:3667
createInjector/instanceCache.$injector<@http://localhost:8000/js/angular/angular.js:3545
getService@http://localhost:8000/js/angular/angular.js:3667
invoke@http://localhost:8000/js/angular/angular.js:3694
instantiate@http://localhost:8000/js/angular/angular.js:3715
@http://localhost:8000/js/angular/angular.js:6766
nodeLinkFn/<@http://localhost:8000/js/angular/angular.js:6179
forEach@http://localhost:8000/js/angular/angular.js:309
nodeLinkFn@http://localhost:8000/js/angular/angular.js:6166
compositeLinkFn@http://localhost:8000/js/angular/angular.js:5630
publicLinkFn@http://localhost:8000/js/angular/angular.js:5535
bootstrap/doBootstrap/</<@http://localhost:8000/js/angular/angular.js:1303
Scope.prototype.$eval@http://localhost:8000/js/angular/angular.js:11930
Scope.prototype.$apply@http://localhost:8000/js/angular/angular.js:12030
bootstrap/doBootstrap/<@http://localhost:8000/js/angular/angular.js:1301
invoke@http://localhost:8000/js/angular/angular.js:3704
bootstrap/doBootstrap@http://localhost:8000/js/angular/angular.js:1300
bootstrap@http://localhost:8000/js/angular/angular.js:1313
angularInit@http://localhost:8000/js/angular/angular.js:1262
@http://localhost:8000/js/angular/angular.js:20583
trigger@http://localhost:8000/js/angular/angular.js:2341
createEventHandler/eventHandler/<@http://localhost:8000/js/angular/angular.js:2612
forEach@http://localhost:8000/js/angular/angular.js:309
createEventHandler/eventHandler@http://localhost:8000/js/angular/angular.js:2611
"

use $ionicModal instead of Modal

1 Like

Thanks Daniel, I should had read the new release announcement thread :frowning:

1 Like

Thanks, @daniel! :smile: