Update JavaScript code to allow new posts.

- Employed a service to keep track of posts, allowing one controller to be used multiple times.

Signed-off-by: Se7enChat <se7enchat@zoho.com>