📜  Angular 4和Angular 5之间的区别

📅  最后修改于: 2021-05-13 20:37:58             🧑  作者: Mango

Angular 4: Angular 4是在AngularJS正式发布5年后发布的。 Angular 4是基于JavaScript的开源框架,用于在JavaScript,HTML和TypeScript(JavaScript的超集)中构建Web应用程序。 Angular 4于2017年3月推出,并支持TypeScript 2.2和2.1等早期TypeScript版本。

Angular 5: Angular 5是Angular 4之后的AngularJS的更高版本,其开发目的是为了更快地创建应用程序,因为它删除了不必要的代码。 Angular 5更高级,具有自己的一系列功能,例如构建优化器,编译器改进和代码共享功能。它于2017年11月1日启动。

Angular 4和Angular 5之间的区别:

S.No. Angular 4 Angular 5
1. Angular 4 was launched in the March 2017. Angular 5 was launched in the November 2017.
2. Angular 4 supports earlier TypeScript versions such as TypeScript 2.2 and 2.1. Angular 5 only supports TypeScript 2.5.
3. Angular 4 does not provide the option to restrict the unneeded white spaces, tabs and newlines. While Angular 5 provides the option to restrict tabs, whitespaces and newlines.
4. Angular 4 does not have the feature of build optimizer. Angular 5 has the feature of build optimizer.
5. Angular 4 does not provide support for multiple naming scheme. Angular 5 provides support of multiple names for both directives and components.
6. In Angular 4, traditional approach is used for tracking life cycle events. In Angular 5, developer can track the route of life cycle events with new router which provides a more realistic tracking.