Angular 2 and Angular 4 Doesn’t have much differences, it’s just an update for the features that are existed in angular2.
Angular2
|
Angular4 / Just Angular
|
Angular2 application size is larger when compared to angular4. | Angular4 application is smaller and faster when compared to angular2 app. |
*ngIf is not build with if/else syntax | *ngIf has if/else syntax that make sense when you are making ajax calls we can show loading within the page. |
For changing a text to title case, we need to write our own logic. | Angular 4 has introduced a new ‘titlecase’ pipe for converting first letter of each word to uppercase Ex: <h1>{{‘hello world’ | titlecase}}</h1> |
For creating templates we need to use template property | New directive ng-template has introduced. |
For animations need to import multiple packages and apply transactions | For animations we now have own package @angular/platform-browser/animations |
No comments:
Post a Comment