implement post creation using angularjs