ericclemmons / ericclemmons/grunt-angular-templates

compiled templateCache does not work for directives

Open
#161 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
705
Forks
107
PR merge metrics
No merged PRs in 30d

Description

compiled template cache does not work, it still send additional http request to get template.
Can anyone help?

Here is an example of a directive:

navigation.js

```
app.directive('navigation', function() {
return {
restrict: 'E',
templateUrl: 'src/components/navigation.html',
controller: 'NavigationController as navCtrl'
};
})
```

templates.js (compiled via grunt-angular-templates)

```
angular.module('app').run(['$templateCache', function($templateCache) {

$templateCache.put('src/components/navigation.html', 'Nav here'

// Other templates here too
);
```

http://stackoverflow.com/questions/32615698/angularjs-templatecache-for-directive-templates-via-grunt-plugin

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.