Added post factory and post creation through angular