function handleDemoStyles() {
      return $q.all(files.css.map(function(file) {
        return file.contentsPromise;
      }))
      .then(function(styles) {
        styles = styles.join('\n'); // join styles as one string

        var styleElement = angular.element('<style>' + styles + '</style>');
        document.body.appendChild(styleElement[0]);

        scope.$on('$destroy', function() {
          styleElement.remove();
        });
      });

    }
function handleDemoStyles() {
      return $q.all(files.css.map(function(file) {
        return file.contentsPromise;
      }))
      .then(function(styles) {
        styles = styles.join('\n'); // join styles as one string

        var styleElement = angular.element('<style>' + styles + '</style>');
        document.body.appendChild(styleElement[0]);

        scope.$on('$destroy', function() {
          styleElement.remove();
        });
      });

    }
function handleDemoStyles ( ) { return $q . all ( files . css . map ( function ( file ) { return file . contentsPromise ; } ) ) . then ( function ( styles ) { styles = styles . join ( '\n' ) ; // join styles as one string var styleElement = angular . element ( '<style>' + styles + '</style>' ) ; document . body . appendChild ( styleElement [ 0 ] ) ; scope . $on ( '$destroy' , function ( ) { styleElement . remove ( ) ; } ) ; } ) ; }
Fetch the demo styles, and append them to the DOM.
Fetch the demo styles and append them to the DOM .
Handle demo styles