AngularJs: novice to ninja - Developing Single Page Blogger example doesn't work

Hi,
i read the book “Angularjs: novice to ninja” and when i tried the example in the chapter 6 i had an error. I downloaded the archive sp-blogger from the link shown in the book and i follow the instructions but in the console i find this error: “Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.0-beta.2/$injector/modulerr?p0=spBlogger&p1…e%20(http%3A%2F%2Fangular.test%2Flib%2Fangular%2Fangular.min.js%3A29%3A115)
and i don’t know what is!

Hi,

Sorry to hear you are having trouble running the code.
Could you post more exact steps so that I can recreate your error?

I have followed the steps in the book and am getting the same issue. I also tried to run the final codebase for the sp-blogger (located here: https://github.com/spbooks/angularjs1) and that also does not work.

Could you let us know which steps?
Which page of the book?
How are you running the code?

I think I managed to reproduce (and then solve) this problem by following the book exactly.

On page 115, I added $ to the state dependency so

angular.module('spBlogger').run(['state , function(state)
➥{ $state.go('allPosts'); }]);

became

angular.module('spBlogger').run(['$state , function($state)
➥{ $state.go('allPosts'); }]);

Also remember to include the ui-router dependency in app.js

angular.module('spBlogger', ['ui.router', 'spBlogger.posts', 'spBlogger.controllers', 'spBlogger.directives', 'spBlogger.filters', 'spBlogger.services']);

Hi,

I have followed the steps in the book and am getting the same issue. I also tried to run the final codebase for the sp-blogger and that also does not work.
Can you plz share me the steps so that can run

I also tried to follow the sp-blogger example.
In the book i get to chapter 6 - app Entry point (index.html)
and tries to run it via. http://localhost:8000
but i get these errors, when i are following the book but also when i use the sourcecode from gifhub.
Internal Server Error{ [Error: ENOENT, open ‘index.html’] errno: -2, code: ‘ENOENT’, path: ‘index.html’ }

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.