Skip to content

Commit

Permalink
fix(module:anchor) remove history.pushState (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk authored and vthinkxie committed Sep 21, 2017
1 parent ae7c757 commit 525edb8
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/components/anchor/nz-anchor.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
Inject
} from '@angular/core';
import { DOCUMENT } from '@angular/platform-browser';
// import { Observable } from 'rxjs/Observable';
import { RxChain } from '@angular/cdk';
import { fromEvent } from 'rxjs/observable/fromEvent';
import { throttleTime } from 'rxjs/operator/throttleTime';
Expand Down Expand Up @@ -108,7 +107,6 @@ export class NzAnchorComponent {

let linkNode = (maxSection.comp.el.nativeElement as HTMLDivElement).querySelector('.ant-anchor-link-title') as HTMLElement;
this.ball.nativeElement.style.top = `${linkNode.offsetTop + linkNode.clientHeight / 2 - 4.5}px`;
// console.log(linkNode, linkNode.offsetTop + linkNode.clientHeight / 2 - 4.5);

this.nzScroll.emit(maxSection.comp);
}
Expand Down Expand Up @@ -149,9 +147,6 @@ export class NzAnchorComponent {
this.animating = false;
this.handleScroll();
});

if (!location.href.includes('#'))
history.pushState(null, '', linkComp.nzHref);
}

ngOnDestroy(): void {
Expand Down

0 comments on commit 525edb8

Please sign in to comment.