Monday, April 20, 2015

AngularJS 1.4 absolutely Refactors Animation system

The AngularJS 1.four unencumber candidate has been announced, bringing a complete refactor of the inner animation code gadget.

With the 1.4 unencumber, ngAnimate makes use of the new animation gadget to provide guide for CSS-based animations in addition to JavaScript-primarily based animations by means of callback hooks.

Google's free up notes for his or her JavaScript framework say that with the $animate characteristic "all of ngAnimate has been rewritten to make the internals of the animation code more bendy, reusable and performant."

Matias Niemelä, software engineer for Google, introduced in a Google+ post "a whole lot of new facets and bug fixes" for ngAnimate in 1.four.

These encompass:

  • The ability to imperatively manage/set off CSS-primarily based transitions/keyframes using $animateCss
  • The means to cross-animate elements throughout pages (the use of ng-animate-ref)
  • a new API for managing callbacks via $animate
  • A bunch of fixes to reflow-related bugs and a better groundwork for more points later to are available in 1.5.
  • a few breaking changes are additionally introduced through $animate. Most specially, these consist of that JavaSript and CSS animations can not be run in parallel. prior to now, with ngAnimate, each CSS and JS animations could be run together when multiple animations had been detected.

    youngsters, youngsters this function has been removed in with 1.four, the AngularJS team notice "the identical impact, with much more chances, may also be finished with the aid of injecting $animateCss into a JavaScript-described animation and growing custom CSS-based mostly animations from there."

    Breaking adjustments brought by $animate also include a flipping of feature params for $animate.enabled() when a part is used -- allowing the characteristic to act as a getter when a single aspect param is supplied.

    an additional breaking adjustments from $animate comprises "there is no deserve to call $scope.$practice or $scope.$digest inner of a animation promise callback, when you consider that the promise is resolved within a digest instantly (however a digest is not run except the promise is chained)."

    // < 1.four $animate.enter(point).then(function() $scope.$apply(characteristic() $scope.explode = actual; ); ); // 1.four+ $animate.enter(element).then(characteristic() $scope.explode = authentic; );

    greater particulars and different breaking alterations can be found right here.

    The Angular 1.four unencumber, code named smooth-unwinding, additionally has a number of efficiency improvements, including ngOptions that best function deep equality determine on ngModel if the use of track via, and $rootScope that eliminates history experience handler when app is torn down.

    1.four turned into firstly slated for unlock by using March 2015, in time for the AngularJS-concentrated convention ng-conf. Work on AngularJS 1.5 starts off with the launch of 1.four. Brad green, engineering director with Google and head of construction for Angular, announced after ng-conf that the the theme of 1.5 might be aiding integration with Angular 2.

    whereas there remains challenge and confusion within the Angular neighborhood over the two.0 liberate, Google have mentioned they'll proceed to host Angular 1.X at angularjs.org, whereas the Alpha unencumber of Angular 2.0 might be hosted at angular.io. Google additionally reassured the neighborhood at ng-conf that Angular 1.X will now not end lifestyles unless the majority of site visitors has moved to 2.0.

    1 comment:

    1. The system you are using to download files is BULLSHIT!

      ReplyDelete