-
Notifications
You must be signed in to change notification settings - Fork 84
Open
Description
in $css.preload, stylesheet.href is not tested for array-ness so,
this works...
css: [
'stylesheets/style.css',
'https://cdnjs.cloudflare.com/ajax/libs/nvd3/1.8.5/nv.d3.css',
'views/visualize-nvd3/visialize-nvd3.css'
]but this fails...
css: {
href: [
'stylesheets/style.css',
'views/visualize-nvd3/visialize-nvd3.css'
],
preload: true,
persist: true
},The former works whether or not preload is set true in global options.
The problem is that
var stylesheetLoadPromises = [];
angular.forEach(stylesheets, function(stylesheet, key) {
stylesheet = stylesheets[key] = parse(stylesheet);
stylesheetLoadPromises.push(
// Preload via ajax request
$http.get(stylesheet.href).catch(function (response) {
if(DEBUG) $log.error('AngularCSS: Incorrect path for ' + stylesheet.href);
})
);
});
if (angular.isFunction(callback)) {
$q.all(stylesheetLoadPromises).then(function () {
callback(stylesheets);
});
}Metadata
Metadata
Assignees
Labels
No labels