question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

link-to helper will run linked route controller init hook when rendered

See original GitHub issue

When you put link-to helper in your code, it will run linked routes init-hook in controller when rendering helper.

{{#link-to "page"}}Link to other route{{/link-to}} will run init-hook in “page”-routes controller

I have provided a simple example project where you can see the error https://github.com/moveniumville/ember_link-to_init

Not working in 2.16 and 2.17 at least

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
lockscommented, Mar 26, 2019

Closing this issue due to inactivity and due to the fact that the controller being instantiated is a side-effect of needing to check the default values of query params.

0reactions
Alonskicommented, Sep 4, 2018

@konradjurk Created this Twiddle that demonstrates this: https://ember-twiddle.com/9491a0c301b8d73c50b6290feff7d9d2

Go to parent route and change between versions 2.12 and 2.18 for example to see the difference in functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

scheduleOne('afterRender') in a Controller.init() does not work ...
Hello, My code : // app/router.js import EmberRouter from '@ember/routing/router'; import config from './config/environment'; const Router ...
Read more >
The 8 Most Common Mistakes That Ember.js Developers Make
3: Not Calling the Default Implementation in setupController. Routes in Ember have a handful of lifecycle hooks to define application-specific behavior. We ...
Read more >
Ember Routing - Model hook not called on page refresh
I am trying to use nested routing to render a collection first. Once the collection is rendered, clicking on an item (using link-to)...
Read more >
Phoenix.Controller — Phoenix v1.6.15 - HexDocs
Controller - functions provided by Phoenix to support rendering, and other Phoenix specific ... The first plug will run only when action is...
Read more >
Introduction to Razor Pages in ASP.NET Core - Microsoft Learn
The rendered HTML from Pages/Customers/Create.cshtml : ... A link to the bundled CSS styles is placed in the app's layout.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found