Skip to content

{{href-to}} helper#1

Merged
GavinJoyce merged 1 commit intomasterfrom
gj/href-to
Jul 15, 2015
Merged

{{href-to}} helper#1
GavinJoyce merged 1 commit intomasterfrom
gj/href-to

Conversation

@GavinJoyce
Copy link
Member

@GavinJoyce GavinJoyce force-pushed the gj/href-to branch 2 times, most recently from 720729d to c9c95c1 Compare July 15, 2015 13:22
@GavinJoyce GavinJoyce changed the title wip {{href-to}} {{href-to}} helper Jul 15, 2015
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I may do this later. I'll try integrating into embercom first

@SeanSmithers
Copy link

👏

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably a case of psychotic over-optimisation but you could avoid this conversation to jQuery and use:

https://developer.mozilla.org/en/docs/Web/API/Element/matches
https://developer.mozilla.org/en-US/docs/Web/API/Element/getAttribute

This code will be running on every click so might be worth it. (probably ok for a later enhancement)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll capture this in an issue and come back to it soon

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#2

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could cache the router lookup inside the closure

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, thanks

@paddyobrien
Copy link

:shipit:

GavinJoyce added a commit that referenced this pull request Jul 15, 2015
@GavinJoyce GavinJoyce merged commit 276dfde into master Jul 15, 2015
@GavinJoyce GavinJoyce deleted the gj/href-to branch July 15, 2015 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants