将angularjs值传递给PHP变量

将angularjs值传递给PHP变量

问题描述:

我从ngStorage开始使用angularjs.我可以成功保存和显示数据.

I am starting with angularjs with ngStorage. I can save and display data successfully.

我像以前一样显示值

{{myobj.session}}

我想将任何存储的值传递给php变量.下面显示的是我的假想逻辑,我知道那是行不通的.我的问题是如何以正确的方式将此类值分配给PHP变量?

I would like to pass whatever stored value into php variable. Shown below is my imaginary logic and I know thats not gonna work. My question is how to assign such value into PHP variable in a correct manner?

<?php 
    $name = {{myobj.session}}
?>

您可以使用以下角度变量:students.tiffen_type
PHP变量:$value

You can use this angular variable: students.tiffen_type
PHP variable : $value

<?php
    $value = "{{ students.tiffen_type }}";
?>