I have added both the files of angular.min.js and angular-route.min.js but still not working
app.js code:
var myApp = angular.module('myApp',[
'ngRoute',
'artistControllers'
]);
myApp.config(['$routeProvider', function($routeProvider){
$routeProvider.
when('/list',{
templateUrl:'partials/list.html',
controller:'ListController'
}).
otherwise({
redirectTo: '/list'
});
}]);
controller.js code:
var artistControllers = angular.module('artistControllers',[]);
artistControllers.controller('ListController', function($scope,$http){
$http.get('js/data.json').then(function(response){
$scope.artist=response.data;
$scope.artistOrder='name';
});
});
hello
' vs. templateUrl temporarily -> do you get hello?..Are you loading angular.js before angular-route..? – Brian Aug 05 '17 at 12:39