Sha256: d9698990a98b8f39db408d14769ada4bba4f4e15d3e2821b9606cd9f027fb2b5
Contents?: true
Size: 493 Bytes
Versions: 14
Compression:
Stored size: 493 Bytes
Contents
app.factory('prepareTemplate', function($q, $http, $templateCache, $compile) { return function(result) { return $q.when(result).then(function(template) { if (_.isFunction(template)) { return template; } else if (_.isString(template)) { return $http.get(template, {cache: $templateCache}).then(function(response) { return $compile(response.data); }); } else { throw 'Resolver returned an unknown type'; } }); }; });
Version data entries
14 entries across 14 versions & 1 rubygems