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 ...
Get AngularJS: Novice to Ninja now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.