added correct outbound dispatching of json data in ahgularjs