try like below. Sometimes the placement of your curly-braces after a
function call can cause craziness.
like, function(){
}
instead of, function()
{
}
hope that helps!
var eventsApp = angular.module('eventsApp', ['ngResource', 'ngCookies'])
.config(function($routeProvider){
$routeProvider.when('newEvent',
{
templateUrl : 'templates/NewEvent.html',
controller : 'EditEventController'
});
})
On Friday, 28 February 2014 18:01:56 UTC-6, cutey Love 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.