'Ember Query Parameter cant send value in hash

I cant send the query param value to call set pageno value

template code :

{{#each @model.PageNo as |item|}}
  <LinkTo @route="getServices" @query={{hash pageno="{{item.pgno}}" }} >{{item.pgno}}</LinkTo>
{{/each}}

controller :

export default class GetServicesController extends Controller {
  queryParams = ['pageno'];

  @tracked pageno = "1";
}


Solution 1:[1]

{{#each @model.PageNo as |item|}}
  <LinkTo @route="getServices" @query={{hash pageno=item.pgno}} >{{item.pgno}}</LinkTo>
{{/each}}

this should work

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Harsh Rohila