When I face this problem sometimes I will provide a function in the .js file that is accessible in the .cshtml file...
// someFile.js
var myFunction = function(options){
// do stuff with options
};
// razorFile.cshtml
<script>
window.myFunction = new myFunction(@model.Stuff);
// If you need a whole model serialized then use...
window.myFunction = new myFunction(@Html.Raw(Json.Encode(model)));
</script>
Not necessarily the BEST option, but it'll do if you have to do it...
The other thing you could maybe try is using data attributes on your html elements like how jQuery.validate.unobtrusive does...
//someFile.js
var options = $("#stuff").data('stuff');
// razorFile.cshtml
<input type="hidden" id="stuff" data-stuff="@model.Stuff" />
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…