I am using Ember 2.7. Is there any way to specify query parameters in the route map URL
router.js
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('index', {path: '/'});
this.route('books', function() {
this.route('index', {path: '?page=0&perPage=25'});
this.route('view', {path: '/view/:bookIdid'});
this.route('new');
});
The above code is generating following URL "localhost:4200/books/?page=0&perPage=25", I am not sure why it is adding slash before the query params.
Any help should be appreciated.
Aucun commentaire:
Enregistrer un commentaire