• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Can we run implement a todo application in AngularJS without any database code?

 
Ranch Hand
Posts: 1546
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We can implement a todo application in AngularJS as below:




This code does not require database at all. In case of creating such an application in AngularJS should we avoid to save todos in database as it runs fine even without it as above?

thanks
 
Ranch Hand
Posts: 97
AngularJS Chrome Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to coderanch.

Yes, you can but scope variable to save locally in JS variable and it will be destroyed once it's page refreshed. you can use some placeholder api endpoint to test your application.

https://jsonplaceholder.typicode.com/
 
Monica Shiralkar
Ranch Hand
Posts: 1546
8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Saloon Keeper
Posts: 22289
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're referring, it appears specifically to keeping the to-do list in server storage. That works - until either the object you hold the list in goes out of scope or the server terminates, whichever comes first.

There are other non-database approaches, however, such as using ordinary disk files. In fact, the TaskWarrior tool that I use for my own daily to-do list keeps its list in flat files.
 
Yes, of course, and I accept that blame. In fact, i covet that blame. As does this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic