-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails with {{link-to params=...}}
#185
Comments
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 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 is the result of running the codemod and manually inserting line breaks where there were previously multiline invocations. I used file line length as a guide, aiming to keep them the same, with one exception: app/templates/components/gutter-menu.hbs, where I made the LinkTo @route instances be on their own lines which added two lines to the file. There was an error processing one file, as in ember-codemods/ember-angle-brackets-codemod#185 Uses of link-to with standalone data attributes were also missed ember-codemods/ember-angle-brackets-codemod#237
This is a manual fix for this instance missed because of ember-codemods/ember-angle-brackets-codemod#185
|
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.The text was updated successfully, but these errors were encountered: