Der folgende Code in meinem Controller ist - wenn ich die console.log() Linie zu erreichen, nichts wird ausgedruckt. Der AJAX-Aufruf gibt ein gültiges Array zurück. Ich habe versucht, $ scope mit anwenden $, aber ich habe bereits ein Prozess im Gange Fehler, ich gehe davon aus, weil $ http automatisch mit startet der Digest-Zyklus.
var mmyApp = angular.module('myApp',['ui.bootstrap']).controller('TasksController', TasksController);
function TasksController($scope, $http) {
$scope.transactions = [];
$http.get('transactions').then(function (response) {
$scope.transactions = response.data;
}, function (error) {
throw error;
});
console.log($scope.transactions);
}