I'm in the process of creating a form for a project I'm working on. If you're interested, you can check out the project on Plunker by following this link: https://plnkr.co/edit/FNx7t48XFOJHrFzIpd1R?p
MainController.js: This file contains a factory called
FormDataService
, which is responsible for tracking user input in real-time and saving it to Angular's front-end model.129.html: Here is where the question is displayed.
Sample.json: This JSON format file is utilized to populate the view found in 129.html.
129Ctrl.js: Simply a controller.
app.js: In this file, I establish the routes for different views using ngroutes.
Within my 129Ctrl.js
, I have included $scope.formData = {}; allowing me to store user inputs in formData
. However, I've encountered an issue where upon page refresh, the formData
is not persistent. The responsibility of handling this should fall on FormDataService within MainController.js, but for some reason, it's not functioning as expected.