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

Commit ac84841

Browse files
author
Gabriel Delépine
committed
Minor cosmetic changes
1 parent d4f98f9 commit ac84841

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

angularDynamicStylesheets.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@
88
* To Public License, Version 2, as published by Sam Hocevar. See
99
* http://sam.zoy.org/wtfpl/COPYING for more details.
1010
*/
11-
var angularDynamicStylesheets = angular.module('DynamicStylesheets', []); // Specific module. Optional
12-
13-
// Add the service to the module
14-
angularDynamicStylesheets.service('dynamicStylesheets', [
15-
'$rootScope',
11+
angular.module('DynamicStylesheets', [])
12+
.service('dynamicStylesheets', [
1613
'$compile',
17-
function($rootScope, $compile) {
14+
function($compile) {
1815

1916
var scope = angular.element('head').scope();
2017

@@ -29,7 +26,7 @@ angularDynamicStylesheets.service('dynamicStylesheets', [
2926
{
3027
for(var i in scope.stylesheets_service_dynamicStylesheets)
3128
{
32-
if(scope.stylesheets_service_dynamicStylesheets[i].href == href) // Unique
29+
if(scope.stylesheets_service_dynamicStylesheets[i].href == href) // An url can't be added more than once
3330
return;
3431
}
3532
}

0 commit comments

Comments
 (0)