我已经搜索了答案,但没有找到,如何解决angular的性能问题?没有第三方库,如:
A) ReactJsB) 其他库。。。
export class ReportController implements ng.IScope {
public contacts: Array<string> _contacts;
private _scope: ng.IScope;
constructor( $scope: ng.IScope ) {
this._scope = $scope;
this._contacts = this.getContacts(); // return 15k result
}
}
顺便说一句:通过不工作来跟踪!不够快。
这里有一个问题,因为您用ng-repeat
标记了它,所以如果您的数据没有更改,您希望研究一次性绑定,例如,除了文档之外,这篇博客文章(以及链接的SO问题)还有一个很好的概述。