如何将AngularJS变量传递给Razor函数?

编程入门 行业动态 更新时间:2024-10-28 00:24:26
本文介绍了如何将AngularJS变量传递给Razor函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

是否可以从Views将angularjs变量传递到razor函数中?

it is possible to pass angularjs variable into razor function from Views?

通过示例,我需要执行以下操作:

By example, I need to do that things :

@ Html.Partial("_ ViewName",new Models(){Url = {{angularJSV​​ariable}}})

有可能吗?如果是,该怎么做?如果没有,从AngularJS上下文中实现该目标的正常过程是什么?

It is possible? If yes, how to do that? If no, what is the normal procedure to achieve that from an AngularJS context?

非常感谢您,

Karine

推荐答案

在不通过服务器的情况下,您无法将任何内容从javascript传递到剃刀.

You cannot pass anything from javascript to razor without going through the server.

剃刀在服务器端执行,而javascript在客户端...有关更多信息,请检查此问题

Razor executed in server side and javascript is in client side...for more information check this Question

更多推荐

如何将AngularJS变量传递给Razor函数?

本文发布于:2023-11-23 18:14:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622418.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   如何将   函数   AngularJS   Razor

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!