Currently, I am immersing myself in learning AngularJS and here is the code snippet that I have crafted:
myApp.config(function($routeProvider){
console.log('--Configuration Started--');
$routeProvider
.when('/',{
templateUrl: 'index.html'
})
.when('/list', {
templateUrl: 'list.html'
})
.when('/detail', {
templateUrl: 'detail.html'
})
.otherwise({
redirectTo: '/'
});
});
Upon trying to view this in Chrome, I encounter an issue where the JavaScript console indicates an infinite loop causing the browser to freeze. Interestingly, once I remove this function, everything operates smoothly. Can anyone offer some guidance or insight on this perplexing matter?