i'm trying define requirejs module consists of script tag - how do this? although may not pertinent, reason i'm trying want share constants file between c# mvc 5 , js - see question , accepted answer here.
here's have far:
define('clientserversharedconstants', function () { <script type = "text/javascript" src="@url.action("constants")"></script> }); how do this?
looks want this:
define('clientserversharedconstants', function () { @url.partial("constants") }); in example (assuming worked, don't think does) leave client (browser) download js file.
what propose have partial view render javascript in resulting html eliminating need of client download file.
Comments
Post a Comment