Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PhoneGap and AngularJS for Cross-platform Development

You're reading from   PhoneGap and AngularJS for Cross-platform Development Build exciting cross-platform applications using PhoneGap and AngularJS

Arrow left icon
Product type Paperback
Published in Oct 2014
Publisher
ISBN-13 9781783988921
Length 122 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Yuxian E Liang Yuxian E Liang
Author Profile Icon Yuxian E Liang
Yuxian E Liang
Eugene Liang Eugene Liang
Author Profile Icon Eugene Liang
Eugene Liang
Arrow right icon
View More author details
Toc

Rewriting the simple to-do list app

In Chapter 2, Getting Ready for PhoneGap, we wrote a rather simplistic version of the to-do list app. As you may have already noticed, many things were missing; there was no backend server to save your to-do lists, and there was no code organization, as everything was just written within a folder and with minimal breakup of the code.

In this section, we are going to do just that; rewrite the code so that there are some levels of code organization.

Let's review the code organization first. The app we built in Chapter 1, Introduction to AngularJS, looks like the following:

todo/
   todo.js
   index.html

We are going to break up the code so that the code organization looks as follows:

project/
   css/
   js/
      controllers/
            todo.js
      services/
            todo.js
      app.js
  partials/
     detail.html
     list.html
  index.html

So what is going to happen is that project.js from Chapter 2, Getting Ready for PhoneGap, will be broken...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image