• 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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

 
Ranch Hand
Posts: 1045
2
  • 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: 93
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: 1045
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Saloon Keeper
Posts: 20510
115
Android Eclipse IDE 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!