Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialScott Tolan
1,621 PointsAngular - Storing value of checkbox input to session or local storage?
I've previously asked this question before and someone answered it as needed which was great and it also helped me learn from it, however I have changed the layout of my web application and therefore have come stuck on the same scenario.
Would really appreciate it if someone could help me with this.
I am trying to develop a Angular Web App that is similar to a check-list with a count function, so basically a user will get a list of football grounds and check off which ones they have visited, and then the count will go down. However at the minute it doesn't save whether the user has checked a ground off when the page has been refreshed or closed down (which is expected) however I am trying to achieve this.
The difference between this application and the last one (where the ng-change="saveGrounds()" function solved the problem) is that the JSON files dynamically load into the view depending on the ID the user selects, so I'm getting confused how I would load the page depending on ID then check to see if the user as previously selected a checkbox on that page.
Below is a link to the version 2.0 workspace if anyone could have a look and offer any possible solutions,
Link to version 1.0 workspace which worked:
Thanks