Angular 2 App自己滚动到顶部

时间:2016-09-22 15:58:36

标签: javascript angular outlook office365 outlook-addin

由于应用程序很大,我将尝试简化以下内容:

TagComponent:

@Component({
  selector: "tag",
  template: `<div *ngFor="let a of arr">{{a}}</div>`
})
export class TagComponent{
  @Input() arr: string[];

  add(){
    this.arr.push("abc");
  }
}

AppComponent:

@Component({
  template: `<p><tag [arr]="data"></tag></p>`
})
export class AppComponent{
  data: string[];

  //some other code
}

因此,当调用add()时,只有第一次应用程序自动滚动到顶部,这只发生在运行IE 11的修改版本的Outlook桌面中。它有点难以理解问题并给出一个解决方案,但任何可能导致此问题的提示也将作为答案。

0 个答案:

没有答案