aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ng/directive/a.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/ng/directive/a.js b/src/ng/directive/a.js
index b3e9ad6d..fe50a79b 100644
--- a/src/ng/directive/a.js
+++ b/src/ng/directive/a.js
@@ -32,13 +32,15 @@ var htmlAnchorDirective = valueFn({
element.append(document.createComment('IE fix'));
}
- return function(scope, element) {
- element.on('click', function(event){
- // if we have no href url, then don't navigate anywhere.
- if (!element.attr('href')) {
- event.preventDefault();
- }
- });
- };
+ if (!attr.href && !attr.name) {
+ return function(scope, element) {
+ element.on('click', function(event){
+ // if we have no href url, then don't navigate anywhere.
+ if (!element.attr('href')) {
+ event.preventDefault();
+ }
+ });
+ };
+ }
}
});