Coding Away Coding Away - 1 year ago 78
Ajax Question

Nothing Displayed in web page with Angular clearly showing data in an array

Not sure what is going on , but I'm not getting anything to display on my web page with ng-repeat with template.

Here is a picture image showing the data

This pic shows my console.log output with array of objects

NO IDEA why doesn't just display on the web page!

Devices: Array[17]
0 : Object
Aid : "....."
1 : Object

Angular controller with function

(function () {
'use strict';

angular.module('app').controller('DeviceController', DeviceController);

function DeviceController($http){
var vm = this;
var dataService = $http;

vm.devices = [];


function deviceList() {
.then(function (result) {
vm.devices =;
function (error) {

function handleException(error) {





<head> </head>

<div ng-app="app" ng-controller="DeviceController as vm">

<tr ng-repeat="device in vm.devices">


<script src=""></script>

<!--<script src="~/Scripts/angular.min.js"></script>-->
<script src="./app/app.module.js"></script>
<script src="./app/device.controller.js"></script>


NO IDEA why doesn't just display on the web page!

Answer Source

As you have data inside Devices object of response, then you need to change your assignment in ajax resolve like below.

vm.devices =;

I'd suggest you to change your response from server, instead of sending Devices collection in Devices object, directly send it in response.

OR you could also make changes on HTML directly, but it wouldn't be good way to go.

<tr ng-repeat="device in vm.devices.Devices">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download