Home > Article > Web Front-end > Why use angular4? The difference between angularjs and angular4
This article mainly introduces the difference between angularjs and angularjs4, as well as the details of the benefits of using angular4. Let’s read this article together
angularjs Disadvantages:
1. The dirty value checking mechanism itself will be triggered when the page data changes. When more and more data are bound to the page, the program will continuously trigger the dirty value checking mechanism, and the response of the program will become worse. Coming slower and slower
2. Routing and sub-routing cannot be nested. A third-party solution urouter is provided, but it is very unstable to use.
3. Scope $scope scope restrictions make many native events unusable. For example, click events must be implemented using instructions
4. When verifying the form, you must write an instruction to prompt an error message, which is very troublesome
New features of angular4:
1. The new command line tool angular cli
2. Server-side rendering can make a single-page application that takes 10 seconds to load complete in 1 second. You can also do SEO optimization for each individual view
3. Compatible with mobile and desktop. Create cross-platform applications and mobile applications, providing UI components that can be used on mobile and desktop terminals
(If you want to see more, go to the PHP Chinese websiteAngularJS Development ManualLearning in)
Comparison with other frameworks:
1. react
1. Virtual DOM, fast response,
2.flux architecture, realizing server-side rendering
3. It is just the V layer in MVC and often needs to be used in combination with other libraries. The focus is on the UI
And angular meets all the above advantages
2. vue
1. Simple
2. Flexible
3. Only focus on web
4. Personally led (angular is similar to the ecosystem, vue is similar to the community .vue was developed by the angular Google team of domestic experts)
5. Server-side rendering, vue can only use other server rendering libraries
angular can be used to render web, ios, android, and mobile terminals
This article ends here (if you want to see more, go to the PHP Chinese website AngularJS User Manual to learn). If you have any questions, you can leave a message below.
The above is the detailed content of Why use angular4? The difference between angularjs and angular4. For more information, please follow other related articles on the PHP Chinese website!