Integration of external apis


#1

Please help me out i need you to explain me about integration of external api(s) in Cakephp and how to integrate Angular 4, 5 or 6


#2

Hi @WinnersProx kindly explain your question. Which cakephp version do you have and which angular version do you have. Do you have proper api documentation (i.e can you run these apis on PostMan or some other tool available to test apis???)


#3

There’s a couple of ways you can approach that problem (I’ve done some basic stuff with React, principals are same for other frameworks. At a simple level you could put load your .js code into a Cake template (for larger apps with different pages you’ll probably want to use Webpack’s code-splitting).

Actually getting data from a CakePHP backend can either be done though passing data directly in, say, though the window global namespace. If you want to do an API, then CakePHP already has the structure there, but there’s plug-ins like https://github.com/multidots/cakephp-rest-api that work well.