Creating NearMe1 locally: view won't show up


#1

Hi i'm recreating the NearMe project locally (i already got it to work on codecademy). It's all fine except when i am trying to move the content from the index.html page to the views, even though i checked my code a thousand times. I wonder if my browser urls are the problem since, when i click on "About" I get a Url of index.html#/about not index.html/#/about.

any ideas anyone? Thanks a lot!

app.js:
angular.module('NearMeApp',['leaflet-directive','ngRoute']).config(function($routeProvider){
$routeProvider
.when('',{
controller: 'MainController',
templateURL: 'views/main.html'
})
.when('#/about',{
controller: 'AboutController',
templateURL: 'views/about.html'
})
.otherwise({
redirectTo: ''
})
});


#2

got it: forgot to add '$routeProvider' as a dependency in config it should be:

.config('$routeProvider',function(...


#3

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