How passing AngularJS variables to Razor function?

2019-09-15 17:31发布

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 }} })

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

Thank you very much,

Karine

1条回答
疯言疯语
2楼-- · 2019-09-15 18:26

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

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

查看更多
登录 后发表回答