Skip to content

Empty template files break cache #9

@stuartm

Description

@stuartm

If there are empty files then npm-html2js starts pushing the content from the next file in the directory into the cache under the wrong filename.

e.g. in a directory with files A, B, C - where B is an empty file, the result is as follows:

angular.module('my.templates', [])
  .run(['$templateCache', function($templateCache) {
    $templateCache.put('A.html',
    '<div>This is A</div>\n' +
    '')
  $templateCache.put('B.html',
    '<div>This is C</div>\n' +
    '')

  }]);

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