generator-angular-fullstack icon indicating copy to clipboard operation
generator-angular-fullstack copied to clipboard

Filter generator broken with default module name

Open carpaij opened this issue 10 years ago • 0 comments

Today I needed to create a new filter and the generator didn't work for me out of the box with default settings to the few prompts. In the browser (Chrome) it returned the following error:

Module 'app.filter' 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.

It turned out that the scaffolded filter had a wrong default for the module name as it is appending the filter name I provided filter behind the app name app.

angular.module('app.filter')
  .filter('filter', filterFilter);

Changing the module name as in the example below worked:

angular.module('app')
  .filter('filter', filterFilter);

Am I missing something here or should we fix the generators?

  • [x] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.
Item Version
generator-angular-fullstack 3.7.6
Node 4.2.4
npm 3.6.0
Operating System Ubuntu 14.04
Item Answer
Transpiler Babel
Markup Jade
CSS LESS
Router ui-router
Build Tool Gulp
Client Tests Mocha
DB MongoDB
Auth N

carpaij avatar Jul 12 '16 21:07 carpaij