2

I am learning angularjs and created a demo application.

Here is the plunker

In that application I could not make the routing works properly.

When the "/main" route works perfectly but "/user/:username" did not work.

Can anyone please help me out to find the problem?

Thanks

1 Answer 1

3

You have a typo in "teplateUrl". Changing it to "templateUrl" fixes your issue.

.when("/user/:username", {
    "controller": "UserController",
    "templateUrl": "user.html"
})

Updated fiddle here.

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

1 Comment

ahh...that's ridiculous. Spent hours to figure out what's went wrong there. As I have little knowledge about angularjs, thought there must be something I am missing. thanks a lot!

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.