Logo white

WebCompDev / COMPONENTS

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • COMPONENTS
  • bower_components
  • polymer-element-catalog
  • app
  • elements
  • app-link
  • app-link.html
  • polymer catalog
    07d13c9c
    isisadmin authored
    2015-11-20 14:52:39 +0100  
    Browse Code ยป
app-link.html 391 Bytes
Edit Raw Blame History
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<script>
Polymer({
  is: 'app-link',
  extends: 'a',
  properties: {
    skipNav: Boolean
  },
  listeners: {
    'click': 'navigate'
  },
  navigate: function(e) {
    // allow for ctrl+click to open in new window
    if (e.ctrlKey || e.metaKey) {
      return true;
    } else {
      e.preventDefault();
      if (!this.skipNav) this.fire('nav', {url: this.href});
    }
  }
});
</script>