The new features in AngularJS 1.3.0
Science / Technology

The new features in AngularJS 1.3.0

sasi
sasi
2 min read

As you probably have heard by now, several new features have been included in the latest version of AngularJS 1.3.0. These much-needed updates have greatly improved upon some of the performance issues we have seen in the past, simplified the code writing process and offers a host of new functionalities.

The developers themselves have stated in its official press release that the release has addressed over four hundred bug fixes and documents over a thousand improvements including custom form controls and animations.

One notable performance improvement in Angular JS is the one-time binding feature:

One-time-binding  – the expression that is started with “::” is now considered one-time binding. This expression will only be interpolated once, and then no longer watched, thus making the digest loop a whole lot faster.

 

Controller code:

var cronjAngApp = angular.module(\'cronj\', []);cronjAngApp.controller(\'ontTimeBinding\',     [\'$scope\', function($scope) {      $scope.pLanguages = [angular, node, python, c#];    $scope.commonName="++";    $scope.addLanguage = function() {       $scope.pLanguages.push(\'polymer\');       $scope.commonName="**";    } }]);

HTML code:

<div ng-controller="ontTimeBinding">  <div ng-repeat="pLanguage in ::pLanguages">     {{pLanguage }}{{::commonName}} </div> <div ng-repeat="pLanguage in pLanguages">     {{pLanguage }}{{commonName}} </div> <div ng-if="::pLanguages">click this button and see the difference in output. </div> <div class="btn btn-info" ng-click="addLanguage()">click here</div> </div>

If this is any indication of what is in store for us with each new version of AngularJS, I cannot wait to see what comes next.  For now, I will just try out this version to see what amazing things I can create.

ReactJS Development Services

Discussion (0 comments)

0 comments

No comments yet. Be the first!