In our MVC 5 project we use Angular. The following Razor works nicely:
@Html.EditorFor(x => x.FirstName,
new { required = \"required\", ng_mode
There is no need to separate the model into individual fields when you bind to scope. Instead you should bind the entire model:
$scope.model = @Html.Raw(Json.Encode(Model));
This would render to the client as:
$scope.model = { FirstName: 'John', LastName:'Doe', etc };
Then you can bind your input fields as:
@Html.EditorFor(x => x.FirstName,
new { required = "required", ng_model = "model.FirstName" })
Personally, I think its cleaner not to use @Html, in favor of simple HTML:
In Angular, you don't really need an id anymore.