Angular Service To Set And Retrieve Object Between Controllers

后端 未结 2 1195
失恋的感觉
失恋的感觉 2021-01-18 03:54

I been trying to set an service object from a http post response to a controller and getting it from another controller.
The tutorials I seen in SO or sites are focused

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-18 05:01

    create a basic service with setters and getters. Inject the service into both the controllers. use setter in one controller and getter in the another.

提交回复
热议问题