Skip to content

Commit a05ee40

Browse files
committed
fix($StateRefDirective): fix anchor check flaw angular-ui#1667
Fix the tagName comparism to make ui-sref also work inside an SVG.
1 parent ee7350d commit a05ee40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/stateDirectives.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function $StateRefDirective($state, $timeout) {
8686
link: function(scope, element, attrs, uiSrefActive) {
8787
var ref = parseStateRef(attrs.uiSref, $state.current.name);
8888
var params = null, url = null, base = stateContext(element) || $state.$current;
89-
var newHref = null, isAnchor = element.prop("tagName") === "A";
89+
var newHref = null, isAnchor = element.prop("tagName").toUpperCase() === "A";
9090
var isForm = element[0].nodeName === "FORM";
9191
var attr = isForm ? "action" : "href", nav = true;
9292

0 commit comments

Comments
 (0)