Open gorner opened 4 years ago
Hi @gorner
Can you provide a failing test?
Pushed a branch with a failing test to: https://github.com/gorner/ember-angle-brackets-codemod/tree/bug/link-to-params
Note that I am not certain that @params
works (or is intended to work) with the angle-bracket version.
Additional context: We mostly use this in our app for a set of items with associated links, some of which may just be query param settings on the current route, some of which may be to a different route. e.g.:
buttons: [{
// ...
linkParams: [{ isQueryParams: true, values: { someBoolean: true } }] // set ?someBoolean=true on current route
},
{
linkParams: ['some.route.name', this.model.id] // different route
}]
{{#each buttons as |btn|}}
{{#link-to params=btn.linkParams ...}} ... {{/link-to}}
{{/each}}
This just happened to me too, thanks for opening the issue, @gorner. The file in question was this one.
@params
does still work, incidentally! 🥳
This error is occurring with two templates, with the only thing in common (and different from every other template) being the use of the (private) params option in link-to, as in
{{#link-to params=someObject ...}}
. I suspect that's the reason for the error, but still felt like I should report it even if it's a wontfix scenario.