I have the following provider that is causing the application to not do anything, yet no errors on the console... I have looked at it for hours to no avail.
(function (angular) { "use strict"; angular.module('app').provider('templateRepository', function () { var templateKey = 'template:', useCache = true, cacheDuration = 30, autoCleanCache = true, cleanCacheInterval = 30; return { $get: ['$http', '$q', '$interval', function ($http, $q, $interval) { var getFromCache = function (key) { return JSON.parse(localStorage.getItem(key)); }, getFromServer = function (name) { return $http.get('Template/Index?name=' + name).then(function (response) { return response.data; }); }, isExpired = function (item) { return ((parseInt(new Date() - new Date(item.timestamp)) / (1000 * 60)) >= cacheDuration); }, removeFromCache = function (key) { localStorage.removeItem(key); }, saveToCache = function (key, value) { localStorage.setItem(key, JSON.stringify({ timestamp: new Date().toUTCString(), value: value })); }, cleanCache = function () { for (var key in localStorage) { if (key.substring(0, 9) === templateKey) { if (isExpired(JSON.parse(localStorage.getItem(key)))) { removeFromCache(key); } } } }; if (useCache && autoCleanCache) { $interval(function () { cleanCache(); }, (cleanCacheInterval * 60 * 1000)); } return { get: function (name) { var key = templateKey + name, d = $q.defer(), item; if (useCache) { item = getFromCache(key); if (item === null) { getFromServer(name).then(function (template) { saveToCache(key, template); d.resolve(template); }); } else { if (isExpired(item)) { getFromServer(name).then(function (template) { saveToCache(key, template); d.resolve(template); }); } else { d.resolve(item.value); } } } else { getFromServer(name).then(function (template) { d.resolve(template); }); } return d.promise; } }; }], configureCache: function (enable, duration, autoClean, cleanInterval) { useCache = enable; cacheDuration = duration; autoCleanCache = autoClean; cleanCacheInterval = cleanInterval; } }; }); }(this.angular));
this.angularand not justangularas the variable being passed into the closure?