Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block fergusg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
fergusg / veto-click-usage.ts
Last active Nov 29, 2015
Example usage of veto
View veto-click-usage.ts
selector: 'home'
template: `
<a [veto-router-link]="['/Heroes']" [veto-if]="true">Heroes (vetoed)</a>
<a [veto-router-link]="['/Heroes']" [veto-if]="false">Heroes</a>
fergusg / veto-click.ts
Last active Nov 29, 2015
Vetoing a href click in Angular2
View veto-click.ts
import {Component, View, Directive} from 'angular2/angular2';
import {Router, Instruction} from 'angular2/router';
// This is a CSS selector. It's confusing that the template syntax ALSO uses []
selector: "[veto-router-link]",
host: {
"(click)": "onClick($event)",
"[attr.href]": "getLink()"
You can’t perform that action at this time.