O'Reilly logo

AngularJS: Novice to Ninja by Sandeep Panda

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6Developing Single Page Blogger

Developing Our App

Now the fun really begins! In Chapter 2 you downloaded a zip containing the source code for our app. At present it doesn't do very much: It has the starter source code, a good directory structure and includes some modules to make a start. Like every other blogging system, our app also has a posts module. And everything related to the posts module goes into the directory posts. Let's start with the routing first.

Defining Routes

After extracting the zip you downloaded in Chapter 2 you'll have a directory called sp-blogger. This is our working directory.

We'll use Angular UI-router, discussed in Chapter 4, to define states. To do this, simply add the following code to sp-blogger/modules/posts/postModule.js ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required