Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am new to AngularJs. I have a details page where I display the link like below:

<a href='/device-summary/"+ full.link.href+"'>"+ data_to_be_displayed+"</a>

In the above link, the full.link.href points to another host url i.e, http://www.hostname.port/list/items/12. I want the full.link.href to be handled in my routed defined inside the controller. How can I get this. Please let me know how to define the config inside the controller?

share|improve this question
    
I want to define a route for "/device-summary/hostname.port/list/items/12" and get the value of full.link.href in the controller –  Pradeep May 5 '14 at 14:05

1 Answer 1

The angular router won't know "full.link.href" as a variable since all it receives is a string, what it can know is to expect its value and treat it as a route parameter.

See the example in angular docs which uses $routeParams:

https://docs.angularjs.org/api/ngRoute/service/$route

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.