I am invoking a Web API controller on page load of my form and getting data, this is from my JS file and data is fetched correctly as expected.
var empDetails = // code to invoke my api controller //
empDetails.$promise.then(function (empInfo) {
$scope.employeeForm.EmpDetails = empInfo.EmployeeDetails;
});
$scope.employeeForm.EmpDetails has the details correctly.
I need to display the data in my razor view engine which is where I am having an issue, I am new to this kind of development.
ViewBag, strongly typed model doesn't work here as I am returning data from a Web API controller and mine is not a strongly typed razor view.
EmpDetails has info like EmpID, EmpFirstName, EmpLastName, EmpLocationj