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

Commit c542165

Browse files
committed
fixed bug which caused to work singlePageMode not properly
1 parent f3ecb00 commit c542165

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

angular-css-injector.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ angular.module('angular.css.injector', [])
1212

1313
function CssInjector($compile, $rootScope){
1414
// Variables
15-
var singlePageMode = false,
16-
head = angular.element(document.getElementsByTagName('head')[0]),
17-
scope;
15+
var head = angular.element(document.getElementsByTagName('head')[0]),
16+
scope;
1817

1918
// Capture the event `locationChangeStart` when the url change. If singlePageMode===TRUE, call the function `removeAll`
2019
$rootScope.$on('$locationChangeStart', function()
2120
{
2221
if(singlePageMode === true)
2322
removeAll();
2423
});
25-
24+
2625
// Always called by the functions `addStylesheet` and `removeAll` to initialize the variable `scope`
2726
var _initScope = function()
2827
{

0 commit comments

Comments
 (0)