Skip to content

Request: amendment to https://github.com/emberjs/rfcs/pull/391 #789

@NullVoxPopuli

Description

@NullVoxPopuli

This has come up a bit as I've been discussing emberjs/ember.js#19271 and #391 with folks.

as is, I don't think #391's anchor-listener is able to be implemented as default behavior.

Mainly due to analytics.
I made a demo here showing that willRouteChange can be used for a lot of things.
But, if you want to do A/B testing with different call-to-action phrasings, we need some way to hook in to the transition/navigation logic (so that we can grab the clicked text)

I'd like to propose a couple options:

  • an additional event on the router service, for handling click events (to grab the text of the anchor, for example)
  • passing the any potential "meta" along with the arguments of willRouteChange and didRouteChange events (and having the clicked element as a part of that "meta")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions