On Github sfroestl / angular-13-talk
Huge performance improvements!
One time bindings
<div ng-init="name='Berlin'"> <p>Hello {{::name}}</p> <p>Hello {{name}}</p> <input ng-model="name"> </div>
<ul><li ng-repeat="friend in ::friends">{{friend}}</li></ul> <p data-tooltip="{{::getTooltip()}}"></p>
ngModel options
<h3>Search: {{query}}</h3> <input ng-model="query" ng-model-options="{debounce: {'default': 1000}}">
<h3>Name: {{name}}</h3> <input ng-model="name" ng-model-options="{updateOn: 'blur'}">
ngModel $validators
.directive('available', function ($timeout) { return { require: 'ngModel', link: function ($scope, element, attrs, ngModel) { ngModel.$asyncValidators.available = function (username) { return $timeout(function () { return true; }, 1000, false); }; } }; });
ng-messages
<span ng-messages="form.usernameInput.$error"> <p ng-message="minlength">…</p> <p ng-message="maxlength">…</p> <p ng-message="pattern">…</p> </span>
ng-animate
element.on('click', function (e) { $animate.animate(angular.element(indicator), {}, { left: e.offsetX + 'px', top: e.offsetY + 'px' }, 'is-animating'); $scope.$digest(); });
$compileProvider.debugInfoEnabled(false);
Disables classes like "ng-binding, ng-scope" (used by protractor, batarang etc.)
Quick look at Angular 2