Skip to content

Commit d887bcf

Browse files
aitboudadchristopherthielen
authored andcommitted
[uiSref] use renderer to remove href attribute.
1 parent d0b1c1e commit d887bcf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/directives/uiSref.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/** @ng2api @module directives */
22
/** */
3-
import { UIRouter, UIRouterGlobals, extend, Obj, TransitionOptions, TargetState } from "@uirouter/core";
3+
import { UIRouter, extend, Obj, TransitionOptions, TargetState } from "@uirouter/core";
44
import { Directive, Inject, Input, Optional, ElementRef, Renderer2 } from "@angular/core";
55
import { UIView, ParentUIViewInject } from "./uiView";
66
import { ReplaySubject } from "rxjs/ReplaySubject";
@@ -17,10 +17,10 @@ export class AnchorUISref {
1717
return this._el.nativeElement.target === '_blank';
1818
}
1919
update(href: string) {
20-
if (href && href != '') {
20+
if (href && href !== '') {
2121
this._renderer.setProperty(this._el.nativeElement, 'href', href);
2222
} else {
23-
this._el.nativeElement.removeAttribute('href');
23+
this._renderer.removeAttribute(this._el.nativeElement, 'href');
2424
}
2525
}
2626
}

0 commit comments

Comments
 (0)