是否可以从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 = {{angularJSVariable}}})
有可能吗?如果是,该怎么做?如果没有,从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函数?
发布评论