Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

Commit 5ef2388

Browse files
Merge pull request #33 from ngehlert/main
added getStyleSheets()
2 parents 0d095dc + a899980 commit 5ef2388

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: angular-css-injector.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ angular.module('angular.css.injector', [])
5353
scope.injectedStylesheets.push({href: href});
5454
};
5555

56+
// gets all stylesheets
57+
var getStyleSheets = function() {
58+
_initScope();
59+
return scope.injectedStylesheets === undefined ? [] : scope.injectedStylesheets;
60+
}
61+
5662
var remove = function(href){
5763
_initScope();
5864

@@ -78,7 +84,8 @@ angular.module('angular.css.injector', [])
7884
return {
7985
add: addStylesheet,
8086
remove: remove,
81-
removeAll: removeAll
87+
removeAll: removeAll,
88+
getAll: getStyleSheets
8289
};
8390
}
8491

0 commit comments

Comments
 (0)