Try changing the when value to '/newEvent' and changing the href on the anchor to "/newEvent".
On Fri, Feb 28, 2014 at 6:01 PM, cutey Love <[email protected]> wrote: > Hi, > > I'm currently learning AngularJS, I'm doing the Plural sight course. > > It's showing Routing but I'm having an issue and I don't know why or how > to fix it. > > In the tutorial he's using the code: > > HTML > > >> *<li><a href="#/newEvent">Create Event</a></li>* > > > ANGULAR > > var eventsApp = angular.module('eventsApp', ['ngResource', 'ngCookies']) > .config(function($routeProvider) > { > $routeProvider.when('newEvent', > { > templateUrl : 'templates/NewEvent.html', > controller : 'EditEventController' > }); > }); > > The problem is when I click new event it doesn't work, in the tutorials > browser it displays as /#/newEvent where as on my local machine it displays > #/newEvent. I've also had this problem with the tutorial files having a > forward / to the javascript files etc, I've had to remove them on my local > machine to make them work. > > It's like my code doesn't execute the same way as the tutorial, and I'm > not sure how to fix it? > > I'm using NetBeans > > > > > -- > You received this message because you are subscribed to the Google Groups > "AngularJS" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/angular. > For more options, visit https://groups.google.com/groups/opt_out. > -- R. Mark Volkmann Object Computing, Inc. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/groups/opt_out.
