原項目用ng1.5寫的,如今改爲ng2.0了,踩了很多坑,不過都忘記了。ui
若是你也正好要作這個工做,正好看到這個文章,不妨參考下。router
AngularJs 1.x -> 2.0ip
ng-repeat -> *ngFor
ng-show -> *ngIf [hidden] [style.display]=""
ng-class -> [ngClass]
ng-if -> *ngIf
ng-model -> [(ngModel)] + name=''
ng-click -> (click)
ui-sref -> routerLink="../{{p.ID}}"
myattr='x' -> attr.myattr='x'
class
另,<script>再也不支持了,用System.Import(),我沒試過。cli