Skip to content

compiled templateCache does not work for directives #161

@idododu

Description

@idododu

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>Nav here</nav>'

     // Other templates here too
);

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions