Routes Tutorials / NearMeApp - Internal Browser not working?


#1

Am I the only one who’s having issues with Codecademy’s internal browser rendering Routes? Code attached below, just wanted a sanity check. Doesn’t appear to render the DIV ng-view elements on both this project and the Routes tutorials.


#2

Figured it out…in the app.config element, I have been declaring a variable, ‘$routeProvider’, before the function. Removed this declaration, and the browser renders completely now. Updated below:

app.config(function($routeProvider) {
  $routeProvider.when('/', {
      controller: 'MainController',
      templateUrl: 'views/main.html'
    }).when('/about', {
      controller: 'AboutController',
      templateUrl: 'views/about.html'
    }).otherwise({
      redirectTo: '/'
    });
});

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.