link-to helper will run linked route controller init hook when rendered
See original GitHub issueWhen 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:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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.
@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.