Skip to content
Advertisement

Is there a way to communicate angular component with native php backend ( not rest api )

I’m currently working on a migration of a project that is developed with native PHP, HTML, js to a new technology Angular The client asks if there is a possibility to create a list of components that somehow can communicate and fetch data with the existing backend ( native PHP )

Advertisement

Answer

Since angular is a client-side and PHP is a server-side, the only way to communicate both is using requests or websockets

You can create a server API that exposes the required logic to be used by client, and a service in your angular application that implements the requests to that API. Then any component could use that service to perform the requests

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement