Dear Team,
I have a MVC Application, in which I have got the data in datatable.
I have created a view, and also made Angular Controller file.
I have debugged the code, I am getting the data in datatable, but I am not able to display it in view.
My View Code -
- @{
- ViewBag.Title = "PendingAssets";
- }
PendingAssets
- "pendingassetscontroller">
class="tableData" width="80%" border="0" cellpadding="0" cellspacing="0">
Computer.ComputerType Model.Brand.Name Model.Name Computer.TcpIpHostName Asset.SerialNo User.UserName RIL_Inventoried_User.UserName Asset.Field1 "e in PendingAssets" ng-class-odd="'odd'" ng-class-even="'even'"> {{e.ComputerComputerType}} {{e.ModelBrandName}} {{e.ModelName'}} {{e.ComputerTcpIpHostName}} {{e.AssetSerialNo}} {{e.UserUserName}} {{e.RIL_Inventoried_UserUserName}} {{e.AssetField1}} - @section scripts{
- }
pendingassetscontroller.js Code -
- //(function () {
- // 'use strict';
- var app = angular.module('myApp', [])//'MyApp') // extending from previously created angular module in the First Part
- .controller('pendingassetscontroller', function ($scope, PendingAssetsService) { // explained in Part 2 about controller
- $scope.PendingAssetsSrc = null;
- PendingAssetsService.GetPendingAssetsList().then(function (d) {
- $scope.PendingAssetsSrc = d.data; //Success callback
- }, function (error) {
- alert('Error!'); // Failed Callback
- });
- })
- .factory('PendingAssetsService', function ($http) { // I have explained about factory in the Part 2
- var fac = {};
- fac.GetPendingAssetsList = function () {
- return $http.get('/PendingAssets/GetPendingAssetsList')
- }
- return fac;
- });
- //})();
I am also sharing the error screenshot.
Please guide- where am I going wrong.
Please help as it is very urgent.
THank you all in advance.

Sachin SinghRank #66 · 26.2K reputationPosted Mar 3, 2021, 2:01 PM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 4, 2021, 2:31 AM EST
PendingAssets
Kiran MohantyRank #821 · 2.8K reputationPosted Mar 4, 2021, 4:56 AM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 4, 2021, 8:33 AM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 5, 2021, 3:12 AM EST
Riddhi ValechaRank #794 · 2.9K reputationPosted Mar 5, 2021, 6:59 AM EST