I am currently utilizing the gulp-angular-templacache
tool.
I have a task that is supposed to generate a module called templates
and I included it as a dependency in my app
module:
Here are the configurations:
templateCache: {
file: 'tempaltes.js',
options: {
module: 'templates',
standalone: true,
root: 'app/'
}
}
This is how my App module looks like:
var App = angular.module('app', [
'templates']);
Below is my Gulp task:
gulp.task('templatecache', ['clean-code'], function() {
log('Creating AngularJS $templateCache');
return gulp
.src(config.htmltemplates)
.pipe($.minifyHtml({empty: true}))
.pipe($.angularTemplatecache(
config.templateCache.file,
config.templateCache.options
))
.pipe(gulp.dest(config.temp));
However, whenever I try to execute this task, an error message pops up stating:
Uncaught Error: [$injector:nomod] Module 'templates' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
I attempted to make the templatescache non-standalone and remove the dependency but unfortunately, I was unsuccessful... What steps should I take next?