Home >Backend Development >PHP Tutorial >angularjs与yii2传值的问题

angularjs与yii2传值的问题

WBOY
WBOYOriginal
2016-06-06 20:33:561099browse

在yii2中,如何通过angularjs从前端向控制器传值,比如form表单提交?

回复内容:

在yii2中,如何通过angularjs从前端向控制器传值,比如form表单提交?

无论是什么框架,都可以用ajax进行请求,url可以确定控制器或方法,将数据传递过去~

angular可以用$http.post,或者如果Restful的话可以用 $resource。

类似:
user.name = 'hi'
user.password = 'woo~'
user.save()

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn