Quantcast
Viewing all articles
Browse latest Browse all 1799

Angular 4.0 Is Now Released

Image may be NSFW.
Clik here to view.

Angular 4.0 is now released and is not only smaller & faster, but also has an improved *ngIf and *ngFor, source maps for templates, and more.

*ngIf and *ngFor

The template binding syntax now supports a couple helpful changes. You can now use an if/else style syntax, and assign local variables such as when unrolling an observable:

<div *ngIf="userList | async as users; else loading">
  <user-profile *ngFor="let user of users; count as count" [user]="user">
  </user-profile>
 <div>{{count}} total users</div>
</div>
<ng-template #loading>Loading...</ng-template>

TypeScript 2.1 and 2.2 compatibility

Angular is updated to a more recent version of TypeScript. This will improve the speed of ngc and you will get better type checking throughout your application.

Source Maps for Templates

Now when there is an error caused by something in one of your templates, it includes generated source maps that give a meaningful context in terms of the original template.

For complete details on this release check out the Angular site and the announcement blog post.

Update: For those wondering what happened to Angular 3 it was skipped over and you can see this talk from December when they announced this:


Viewing all articles
Browse latest Browse all 1799

Trending Articles