我正在使用“ui-路由器”混合(https://github.com/ui-router/angular-hybrid)引导“经典”方式。
我们正在经历在“悬停”和其他事件上的性能问题,这些事件在数据网格中很明显。我们认为这是由于这里描述的两个版本之间的变化检测重叠/乘法。
https://pr18487-aedf0aa.ngbuilds.io/guide/upgrade-performance
我正在尝试使用上述文档中描述的downgradeModule()引导方法来解决性能问题,但一直未能解决。
不能有角度模块引导,但没有错误。我就是这样做的。触点按钮(角度模块)什么也不做。
https://stackblitz.com/edit/github-ypge8f-jmshp3
我还试图直接引导“触点”角度模块( "App“1懒散加载”联系人“,并认为这可能是一个问题),但结果是一样的。这个问题也在这里上发布
发布于 2018-03-30 03:37:54
经过很长一段时间的斗争,我想我终于明白了。ui路由器使得处理这个问题更加困难,因为使用downgradeModule的所有角度混合示例都使用内置路由器。更新代码以使其工作:https://stackblitz.com/edit/github-ypge8f-jmshp3的诀窍是:
export class AppModule { constructor(private router: UIRouter) { // "router" needed in constructor to bootstrap angular states }
setTimeout(() => { // setTimeout needed to allow angular routes to initialize after refresh urlService.listen(); urlService.sync(); });
https://stackoverflow.com/questions/49398126
复制相似问题