jeudi 17 août 2017

EmberJS: replaceWith & link-to change slash in url to %2F

In my ember app I need to use dynamic segments which may contain "/".

  this.route('lecture',  {path: '/:lecture_url'});

where :lecture_url can be string like 'new-article' or 'lectures/article'

If I type

localhost:4200/lectures/article

route resolver detects model and call replaceWith but the URL is changed to:

localhost:4200/lectures%2Farticle

Also, then I try to create link like

smth

the href of link contains lectures%2Farticle too.

How can I avoid this?




Aucun commentaire:

Enregistrer un commentaire