Home  >  Article  >  Web Front-end  >  How to use Angular 5.0

How to use Angular 5.0

php中世界最好的语言
php中世界最好的语言Original
2017-11-18 16:25:531630browse

Recently Angular 4.0 has been updated to Angular 5.0 version. Many friends have complained that they are not used to it. The version is updated too fast and they are not used to the new version. This time I will update this eventLet's talk to you about how to use Angular5.0 in the future

First of all, for this version update, it is actually just a normal iteration that follows the semantic version number specification.

It has been more than 3 months since 5.0.0-beta.0 on July 19, 2017, and a total of 8 Beta versions and 10 RC versions have been released. Those who have only updated 5.0.0 now are just ordinary Average Users, not pioneer users. In the semantic version number, the role of the Major Version is to introduce Breaking Change, and the Minor Version is used to add functions. Unless there are functions that require Breaking Change to be introduced, there is no need to go to the Major Version. Introduced in (unless it happens to be completed in time).

So it is obvious that the new features of 5.0 claimed in many places (including an official blog) are not completely reasonable. For example, Preserve Whitespace and exportAs were introduced as early as 4.4, and HttpClient was even introduced in 4.4. Introduced in version 4.3. The reason why it is still a new feature of 5.0 is because the branches of 4.x and 5.x are promoted in parallel. In actual development, these features enter the 5.0 version first, and then are Cherry Picked into the 4.x version. But from an (ordinary) user perspective, 5.0 is a successor version of 4.x rather than a preceding version, so features in 4.x should be considered no longer counted as features of 5.0. The really valuable parts are some non-functional parts, such as the optimization of Angular Compiler. Currently, the incremental compilation of AOT can almost be controlled within 1s (so each save will only be -1s?); i18n-related Pipe implementation is no longer dependent on Intl API and so on. It is a pity that AOT by default was Revert one day before the official version of 5.0 was released (fix(@angular/cli): use JIT by default with ng5 by filipesilva · Pull Request #8267 · angular/angular-cli). Of course, to be precise, this is a function that Angular CLI can only implement based on Angular 5, not a function of Angular 5 (and it is just the default behavior, which does not affect the implementability). To sum up: correctly understand the meaning of semantic version numbers and treat major version changes with a normal attitude. Almost all unnecessary misunderstandings come from the lack of understanding of "semantic version number"

To sum up:

Correctly understand the meaning of semantic version number and treat it with a normal mind. Version changes.

The above is an introduction to how to use the new version of Angular 5.0. In fact, as long as the semantic version number is clear, this version will naturally be much easier to understand.

Related reading

Angular gets the json file defined in the project

Detailed introduction to the advanced usage of drop-down boxes in AngularJS

Implementation using AngularJS Custom service

The above is the detailed content of How to use Angular 5.0. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn