chekit
9/26/2017 - 2:56 PM

replace AngularJS expressions with Angular expressions

replace AngularJS expressions with Angular expressions

*ngFor

Заменяет старый синтаксис ng-repeat="item in obj.items track by $index" или ng-repeat="item in items track by $index" на новый *ngFor="let item of obj.items; trackBy: trackById;" или *ngFor="let item of items; trackBy: trackById;"

Выражение:

ng-repeat="([a-zA-Z]*)\s+(in)\s+([a-zA-Z\.{1}().]*)\s+track by \$index"

Замена:

*ngFor="let $1 of $3; trackBy: trackById;"

Пример: http://jsbin.com/wiruqe/edit?js,console, https://regex101.com/r/T9ufcA/4