Angular 4.0 Is Now Released

Angular 4.0 Is Now Released

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">
 <div>{{count}} total users</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:

Filed in: News / Angular
Laravel News Partners

Laravel Jobs

Backend Software Engineer (PHP Developer)
Austin TX, Bonita Springs FL
Certified eSupport Corp
Laravel Developer
Glendale, CA (COVID Remote)
Jogg, Inc
Full-Stack Engineer (Mid to Senior)
Remote (EST, CST)
Senior Laravel Developer (AI Applications)
Remote from anywhere in the UK or from our London office
GreenShoot Labs
Full Stack Engineer


Join 31,000+ others and never miss out on new tips, tutorials, and more.