Angular - CakePHP Integration

OK - let me start by relying on a hand-down question. I am an experienced CakePHP developer and a complete newbie to Angular.

I have a REST enabled backend written in CakePHP v3. Now I am looking to create an interface with an Angular interface for it. The web application has about 25 controllers per backend of about 50 tables - so this is a rather complicated application.

Questions

  • I understand that Angular does not really support state between pages or requests. And for the backend application, it is really "RESTful", it also should not rely on state, but to authenticate each request / action - how to do it? Once the user logs in - how do I create a token that is then exchanged between Angular and CakePHP for each request call?

  • When a user navigates between different pages in an interface, how do I track him and maintain authentication access in Angular?

Again - if these questions seem tame, but the examples and documentation are really not enough to integrate Angular with CakePHP. I hope that eventually I can create some knowledge base.

+4
2

, , , angular . angular . . , " ", . angular "". , angular index.html.

, , Cake, , , cookie http- ( ). angular , .

0

Source: https://habr.com/ru/post/1608923/


All Articles