Implementing controller to accept JSON from Angular