WEB DEVELOPER SITE
PYTHONJAVAPHP7
 

Angular 4 Introduction


It is JavaScript-based open-source front-end web application framework mainly maintained by Google .


First version of Angular 1 it is called AngularJS. Angular 2 was many changes after AngularJS. Angular 4 is almost the same as Angular 2.

Let us now look the new features and the changes made in Angular 4.

Angular 4 but Not Angular 3

Let us now look the new features change Angular 4 −
ngIf
Angular 2 only support if condition.But Angular 4 supports the if else condition.look at how it works using the ng-template.
Condition is valid.
Condition is invalid.

as keyword in for loop

as keyword you can store the value as listed below-
 	<div *ngFor="let i of days | slice:0:5 as total">
   Days: {{i}} Total: {{total.length}}
 	</div>



The variable total stores the output of the slice using the as keyword.

Animation Package

animation package in Angular 4 is supported and imported from @angular/animations where as Angular 2 was @angular/core.

Template

Angular 4 is change