Implement error handling when user submits a post
- If there is an error, the program will now use the throwError function instead of alert to display the error to the user
- If the error is a 302 redirect, then the router will go to the post page and display the error details
Use throwError method on post editing
- When a user edits a post and comes across an error message, the message will be shown via the throwError function and not the alert function
Add clear errors function
- clearErrors function clears error messages from client-side collection Errors
- Function will clear errors that have already been seen or where seen is equal to true
Clear errors in the router
- Navigating to another page will make seen error messages vanish
- clearErrors method is called in router onBeforeAction
Add defer callback to error handling
- Error template will set seen to true after the errors template is rendered
Insert error message seen as false
- When a new error message is inserted into the client-side collection, it is marked as seen false
- This is because although it is in the collection, the user has not seen it yet
- Error will become seen true when the error template is rendered
Merge pull request #23 from alexanderdavidpan/Monitor_And_Clear_Seen_Errors_On_Routing

Monitor and clear seen errors on routing