简体   繁体   English

是否可以在分页器中不以编程方式触发(页面)事件?

[英]Is it possible to not trigger (page) event programatically in Paginator?

I would like to know if there is a way to not trigger the (page) event (and the method called with it) of paginator when using the method "this.paginator.nextPage()"?我想知道在使用方法“this.paginator.nextPage()”时是否有办法不触发分页器的(页面)事件(以及用它调用的方法)?

Something like the "{emitEvent: false}" of the "patchValue()" method.类似于“patchValue()”方法的“{emitEvent: false}”。

Thanks for your answers.感谢您的回答。

I imagine you can use an auxiliar variable我想你可以使用辅助变量

flag:boolean=false;

And use并使用

this.flag=true;
this.paginator.nextPage();
this.flag=false;

<paginator (page)="!flag && doSomething()"></paginator>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM