emberjs / emberjs/rfcs

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

Open
#789 6 comments 2 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
801
Forks
409
PR merge metrics
No merged PRs in 30d

Description

This has come up a bit as I've been discussing https://github.com/emberjs/ember.js/pull/19271 and https://github.com/emberjs/rfcs/pull/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]( https://github.com/NullVoxPopuli/ember-routing-tests) 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")

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.