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.
Riddhi ValechaPosted Mar 5, 2021, 11:59 AM
Riddhi ValechaPosted Mar 5, 2021, 8:12 AM
Riddhi ValechaPosted Mar 4, 2021, 1:33 PM
Kiran MohantyPosted Mar 4, 2021, 9:56 AM
Riddhi ValechaPosted Mar 4, 2021, 7:31 AM
PendingAssets
Sachin SinghPosted Mar 3, 2021, 7:01 PM