FOSJsRoutingBundleを使用してURLを生成する方法を理解できますか?symfony FOSJsRoutingBundle urlを生成する
私はルートを持っている:「
/ajax/send/mail/assistance/nr_center/nr_ind_stuf
が、私はドン:私は、URLをコールすることを望ん
var path =Routing.generate('ajax_stu_sendmail_assistance',{ $center:center,$ind_stu:ind_stu});
を書く私のjqueryのファイルに
/**
* @Route("/ajax/send/mail/assistance/{center}/{ind_stu}",
* defaults = { "center" = 1 ,"ind_stu"=1},
* options = { "expose" = true },
* name = "ajax_stu_sendmail_assistance",
*)
*/
public function sendmailassistanceStuAction(Request $request,$center,$ind_stu,\Swift_Mailer $mailer)
{
をそれがなぜ呼び出されるのかわからない:
/ajax/send/mail/assistance?%24center=nr_center&%24ind_stuf=nr_ind_stuf
これは、1つの変数のみを使用する場合、別の例として機能しますか?
なかれ..あなたに感謝素晴らしいエラー:) –