0

I'm putting together an Ember 2.2 project and I have a modal that I want to open from 2 different places (i.e. show and index). My Router looks like this:

Router.map ->
  @route 'rules', path: '/', ->
    @route 'index', path: '/', ->
      @route 'activations', resetNamespace: true
    @route 'new'
    @route 'show', ->
      @route 'activations', resetNamespace: true
    @route 'edit'
    @route 'schedule'

This works just as I'd expect when I enter the url in the address bar. However, when I use the link-to helper in a template, it always redirects to /show/activations even if I'm in the index route:

app/templates/rules/index.emblem

li: link-to 'activations' | activations

the above redirects to /show/activations rather than /activations as I'd expect.

spinlock
  • 3,737
  • 4
  • 35
  • 46
  • If you don't have it already, I'd suggest getting Ember Inspector. You can open your web console and view all your routes. Play around with your router.js file and see what happens in the inspector. Sometimes for me, it's the only way to figure out what I need to do to get what I want. – NicholasJohn16 Nov 24 '15 at 23:04

1 Answers1

0

This isn't currently possible in Ember as of 2.2. This issue has been opened but not addressed yet.

spinlock
  • 3,737
  • 4
  • 35
  • 46