Hi. I’ve searched around for this, but I can’t work out how to accomplish it, or even quite what to search for.
I’m generating notifications on my server. So, to take a simple example, if you “follow” someone on our site, then you’ll get a notification like this:
Johnny is now following you.
I’d like to be able to generate a link to allow the followed person to click through to Johnny’s profile. Now, I can obviously easily generate a link:
<a href='/people/johnny'>Johnny</a>
But that isn’t bound to a route transition. So, how might I go about binding this on the client?
If I try something like saving the route name and params in the notification, and do this:
[{link-to notification.text notification.route notification.params}}
Where notification.route is “person” and params is “johnny”, it doesn’t link correctly. I’ve previously been able to bind routes in link-to to bound data (in the controller) but not here.
I’d like, if possible to transform the into a link-to. Is that feasible or possible? Prior art?
Thanks, Johnny