How to create a link in a controller?


#1

I want to generate a link to a route and write it to the template. Is there a way to generate a link outside of handlebars?


#2

what is the final goal? could it be as simple as adding the link-to with the handle bars {{#if}}? you can control that with a property in your controller.


#3

The #if block is my current solution but it could turn out to be like 20 blocks in the future. Is there a way to do it with a View?


#4

Can you provide an example or jsfiddle? Maybe you could create a component if its something that will be used repeatedly.