MVC: how to ajax?

前端 未结 6 803
我在风中等你
我在风中等你 2021-02-03 14:01

I\'m going to start a project using a Zend Framework MVC implementation.

How do I work with ajax? I mean, should I place all ajax code into controller? Or into view?

6条回答
  •  被撕碎了的回忆
    2021-02-03 14:31

    Your View can be something other than HTML, and either the pipeline can react to the request being an ajax post, or your controller can react. Either way, it should be as simple as return a different View.

提交回复
热议问题