Performing ajax call via router inside the controller