Skip to content

Commit

Permalink
Added unwrapping of the jquery encapsulated $document variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Gronewold committed Aug 12, 2014
1 parent d08649f commit 330fc3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions angular-local-storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ angularLocalStorage.provider('localStorageService', function() {
// When Angular's $document is not available
if (!$document) {
$document = document;
} else {
// unwrapping the jquery encapsulated document to access cookies
// (see http://www.bennadel.com/blog/2630-accessing-document-properties-in-angularjs.htm)
$document = $document[0];
}

// If there is a prefix set in the config lets use that with an appended period for readability
Expand Down

0 comments on commit 330fc3f

Please sign in to comment.