AngularJS 1.4 has completely reconstructed the animation system.

Source: Internet
Author: User

Share "About Me"

Share [Chinese documentary] Internet age Http://pan.baidu.com/s/1qWkJfcS

share the HTML development macosapp tutorial Http://pan.baidu.com/s/1jG1Q58M 

The AngularJS team has just announced the launch of the 1.4 Release candidate, with a thorough refactoring of the internal animation code system.

In version 1.4, Nganimate used a new animation system to support CSS-based animations and JavaScript-based animations through callback hooks.

In the release notes of this JavaScript framework, Google says that in the new $animate features "All of Nganimate's code has been rewritten to make the internal animation code more flexible, more reusable, and better performing." ”

Matias Niemelä, a software engineer from Google, announced in a post on Google + "a series of new features and bug fixes" nganimate included in version 1.4.

Includes the following content:

    • Use $ANIMATECSS to control or trigger CSS-based transformations and keyframes in an imperative way
    • (using NG-ANIMATE-REF) to generate cross-page, inter-animated elements
    • Handling callbacks using the new API in $animate
    • Includes a large number of reflow-related bug fixes, and will provide a better foundation to enable more features in the upcoming 1.5 release.

$animate also generated a lot of disruptive changes in the new version. One of the most compelling is that JavaScript and CSS animations will not run in parallel. In previous versions, by using Nganimate, you could run both CSS and JS animations while checking for multiple animations to run.

However, although this feature was removed from version 1.4, Angularjs said that "by injecting $animatecss into a JavaScript-defined animation, and creating a custom CSS-based animation in it, you can achieve the same effect, Could even bring more possibilities. "

$animate disruptive changes in the new version also include $animate.enabled () the change in the parameters of the function, which is represented as a getter method when the function of $animate.enabled () is invoked using a single element.

Another destructive launch of the $animate is "no need to call $scope in the promise callback of the animation. $apply or $scope. $digest, Because the promise has been automatically parsed by a digest (but digest does not run automatically if the promised is not chained) "

Use $ANIMATECSS to control or trigger CSS-based transformations and keyframes in an imperative way

(using NG-ANIMATE-REF) to generate cross-page, inter-animated elements

Handling callbacks using the new API in $animate

Includes a large number of reflow-related bug fixes, and will provide a better foundation to enable more features in the upcoming 1.5 release.

< 1.4$animate. Enter (Element).  Then (function () {$scope.  $apply (function () {true;});}); /1.4+$animate. Enter (Element).  Then (function () {true;});       

More details about other disruptive changes can be found here.

The Angular 1.4 version of the development code is smooth-unwinding, which also includes a number of performance improvements, including changes to the ngoptions, and now it will only use track by in the case of Ngmodel depth equivalence test. In addition, when the angular app unloads, the $rootScope also removes the processor for the historical event.

1.4 was originally planned for release in March 2015, when ng-conf, a ANGULARJS-focused conference, was in full swing. After the release of the 1.4 release, the work of AngularJS 1.5 will be formally launched. Brad Green, the director of the Google Engineering team and the leader of the angular development program, announced after the NG-CONF conference that the 1.5 version of the theme was to support integration with angular 2.

Although the entire angular community still has a lot of doubts and confusion about version 2.0, Google has said that they will continue to maintain angular 1.X version on angularjs.org, while publishing angular on Angular.io Alpha version of 2.0. At the Ng-conf conference, Google also once again made clear to the community: Angular 2.0 version of the traffic to the upper hand, they will never end angular 1.X of life.

View English Original: AngularJS 1.4 Completely refactors Animation System

AngularJS 1.4 has completely reconstructed the animation system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.