Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(tabs): replaces $timeout with nextTick in template directi…
Browse files Browse the repository at this point in the history
…ve to further reduce number of digests

Related to #3523
  • Loading branch information
Robert Messerle committed Jul 15, 2015
1 parent 869ca03 commit 8b59e03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tabs/js/templateDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ angular
.module('material.components.tabs')
.directive('mdTemplate', MdTemplate);

function MdTemplate ($compile, $mdUtil, $timeout) {
function MdTemplate ($compile, $mdUtil) {
return {
restrict: 'A',
link: link,
Expand All @@ -22,7 +22,7 @@ function MdTemplate ($compile, $mdUtil, $timeout) {
ctrl.updatePagination();
ctrl.updateInkBarStyles();
});
return $timeout(handleScope);
return $mdUtil.nextTick(handleScope);
function handleScope () {
scope.$watch('connected', function (value) { value === false ? disconnect() : reconnect(); });
scope.$on('$destroy', reconnect);
Expand Down

0 comments on commit 8b59e03

Please sign in to comment.