sebastiangeiger
sebastiangeiger

Reputation: 3416

Strange transition_to behavior

I've come across some unexpected behavior when using transition_to from a router.

What happens is that the route changes correctly but the {{outlet}} is not cleared.

I boiled down the example as much as possible in this jsbin.

I have a authorize and a secret resource, when jumping from the secret resource back to the authorize resource the contents of the secrets template (yellow) stay in place: enter image description here

My expectation would be that the secrets template disappears and the authorize template is rendered into the {{outlet}} instead.

Weirdly enough the ember inspector also doesn't pick up on it: enter image description here

I am fairly new to ember, so my assumption is that I am doing something wrong, but this kind of looks like a bug.

Upvotes: 1

Views: 16

Answers (1)

Kingpin2k
Kingpin2k

Reputation: 47367

You likely have bad HTML in your handlebars, mismatched tags is the biggest reason for this.

Your secret template has two opening div tags.

Upvotes: 1

Related Questions