Skip to content
This repository has been archived by the owner on Mar 29, 2018. It is now read-only.

Filtered templates do not initialize AngularJS module correctly #6

Open
tehplague opened this issue Nov 7, 2015 · 0 comments
Open

Comments

@tehplague
Copy link

The generated JS code omits an at least empty dependency array for the autogenerated module definition. This causes Angular not to create the template module correctly.

To fix this, use the following code for the JS template (note the additional , []):

        $js = <<<JS
angular.module("${moduleName}", []).run(["\$templateCache", function(\$templateCache) {
  \$templateCache.put("$templateName", $html);
}]);
JS;
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant