0

I'm new to Angularjs and have been learning about routing.

I created a test application for routing but somehow it doesn't works!

I have thoroughly checked all the official documentation and tried different combinations but not been able to make it work yet

Here is the code: http://plnkr.co/edit/msjFJfKPq5xm588RJjNP

someone please help!

Thanks in advance

1 Answer 1

1

Change

var app = angular.module('app', ['ngRoute'] );

to

var app = angular.module('app');

in your controllers and everything will be fine

By adding second argument to the module function you register new module.

Updated your plunk

Update

About contact view. There is another typo:

templateURL: 'contact.html'

and should be:

templateUrl: 'contact.html'

Plunk updated.

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks so much Andrey, it totally works! but somehow the contact view still doesn't works. Any idea why? cheers once again
I knew that would be some silly mistake and I was right! Thanks one again for pointing that out. You have been a life saver :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.