Currently, the snippet for a dictionary site I'm building looks like this:
.when('/dictionary/:word2lookup', {
title: 'The MySite dictionary',
templateUrl : 'pages/dictionary.html',
controller : 'dictController'
})
word2lookup is, as the name suggests, the word user enters in the input box and hits the submit button for a translation. When the translated data is rendered in the div below, the URL is programmed to reflect the word like so (say, the user is looking up the word, cortar):
www.mysite.com/dictionary/cortar
However, regardless of the word being looked up, as long as the user stays on this page, the title remains static, i.e. The PeppyBurro dictionary). Is there any way I could pass on the variable word2lookup to the $routeProvider and get it to render a dynamic title like Translation of cortar | The MySite Dictionary?
I tried 'Translation of :word2lookup | The MySite Dictionary' and it failed. I also tried 'Translation of' + :word2lookup + ' | The MySite Dictionary' with no success.