Skip to content

Instantly share code, notes, and snippets.

@KamilLelonek
Created November 16, 2014 20:26
Show Gist options
  • Save KamilLelonek/904b805c758f3cb30980 to your computer and use it in GitHub Desktop.
Save KamilLelonek/904b805c758f3cb30980 to your computer and use it in GitHub Desktop.
Fetching Angular templates and compiling them into cache
app.run ['$http', '$injector', 'SecurityConstants', ($http, $injector, SecurityConstants) ->
$http.get("#{SecurityConstants.assetsHost}/templates/partials.html").then((response) ->
$injector.get('$compile') response.data
response
)
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment