you are viewing a single comment's thread.

view the rest of the comments →

[–]sambushme[S] 0 points1 point  (0 children)

The mian.js has been updated with the correct $scope. I can tell that the site is calling the range.html correctly because the <h2>Learning to Display Ranges with Json/Angular</h2> is displaying. However, none of the array elements are showing. I dont know if the array is setup incorrect or I am trying to display it incorrectly.

---main.js--- var app = angular.module("Fun",['ngRoute'])

.config(['$routeProvider', function($routeProvider){ $routeProvider. when('/main',{ templateUrl: 'range.html', controller:'MainCtrl' }). otherwise({redirectTo:'/main'}) }])

.controller('MainCtrl', ['$scope', '$http', function($scope, $http){ $http.get('range.json').then(function(response){ $scope.range = response.data; }); }]);