fixes bug with $templateCache usage #241
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
$http does save more than just the template content to $templateCache. It's an object that also contains response code, etc.
ngDialog pushes only the template content to the same cache, which results in errors if the template has already been cached by the native mechanisms before. Also if after the template is loaded by ngDialog native template loading will fail.
Additionally setting the $http cache option to true (caching in default cache) and pushing the result into $templateCache leads to caching the template twice.