src/core/services/layout/layout.js
function buildCloakInterceptor(className) {
    return ['$timeout', function($timeout){
      return {
        restrict : 'A',
        priority : -10,   // run after normal ng-cloak
        compile  : function(element) {
          if (!config.enabled) return angular.noop;

          // Re-add the cloak
          element.addClass(className);

          return function(scope, element) {
            // Wait while layout injectors configure, then uncloak
            // NOTE: $rAF does not delay enough... and this is a 1x-only event,
            //       $timeout is acceptable.
            $timeout(function(){
              element.removeClass(className);
            }, 10, false);
          };
        }
      };
    }];
  }
function buildCloakInterceptor(className) {
    return ['$timeout', function($timeout){
      return {
        restrict : 'A',
        priority : -10,   // run after normal ng-cloak
        compile  : function(element) {
          if (!config.enabled) return angular.noop;

          // Re-add the cloak
          element.addClass(className);

          return function(scope, element) {
            // Wait while layout injectors configure, then uncloak
            // NOTE: $rAF does not delay enough... and this is a 1x-only event,
            //       $timeout is acceptable.
            $timeout(function(){
              element.removeClass(className);
            }, 10, false);
          };
        }
      };
    }];
  }
function buildCloakInterceptor ( className ) { return [ '$timeout' , function ( $timeout ) { return { restrict : 'A' , priority : - 10 , // run after normal ng-cloak compile : function ( element ) { if ( ! config . enabled ) return angular . noop ; // Re-add the cloak element . addClass ( className ) ; return function ( scope , element ) { // Wait while layout injectors configure, then uncloak // NOTE: $rAF does not delay enough... and this is a 1x-only event, //       $timeout is acceptable. $timeout ( function ( ) { element . removeClass ( className ) ; } , 10 , false ) ; } ; } } ; } ] ; }
Tail-hook ngCloak to delay the uncloaking while Layout transformers
finish processing. Eliminates flicker with Material.Layouts
Tail - hook ngCloak to delay the uncloaking while Layout transformers finish processing . Eliminates flicker with Material . Layouts