urish / angular-load

Dynamically load scripts and css stylesheets in your Angular.JS app
MIT License
243 stars 65 forks source link

render-blocking CSS #21

Closed HoplaGeiss closed 8 years ago

HoplaGeiss commented 8 years ago

After testing my website on google page speed insight I decided to use angular-load to remove the render blocking CSS.

However, even when I am using angular-load, google still detects render blocking css. Is this really making css load asynchronously?

Here is a snipet of my code:

      $stateProvider
        .state('main', {
          url: '/',
          abstract: true,
          templateUrl: 'main/main.html',
          controller: 'MainCtrl',
          resolve:{
            load: ['angularLoad', function(angularLoad){
              return angularLoad.loadCSS('<%= asset_path "normalApp.css" %>')
            }]
          }
        })
HoplaGeiss commented 8 years ago

I run google insight again this morning and all seems ok.. Sorry for the post!