Skip to content

possible issue with angular-fullstack:route  #2164

@jhancock1975

Description

@jhancock1975
  • 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 4.0.1
Node 3.6.1
npm 3.10.3
Operating System Linux Mint 17.1 Rebecca

I am using generator-angular-fullstack version 4.0.1
% npm list -g --depth=0 | grep generator-angular-fullstack ├── generator-angular-fullstack@4.0.1

after running

angular-fullstack:route games

angular-fullstack generates files properly under client/app/games, but browsing to http://localhost:3000/games only re-directs to the home page.

I have to add two things to client/app/app.js:

import games from './games/games.component';
...
angular.module('meanTutorialApp', [
    // ngAnimate,
    ngCookies, ngResource, ngSanitize, uiRouter, uiBootstrap,
    // ngMessages,
    navbar, footer, main, constants, util, games  ])
  .config(routeConfig);

N.B: I had to add, "games," to the list of modules.

After that, when open the application in a browser (http://localhost:3000), I get a totally blank screen.

Looking at the browser (chrome) JavaScript console, I see

angular.js:68Uncaught Error: [$injector:modulerr] Failed to instantiate module meanTutorialApp due to:
Error: [$injector:modulerr] Failed to instantiate module meanTutorialApp.games due to:
Error: [$injector:strictdi] function($stateProvider) is not using explicit annotation and cannot be invoked in strict mode...

Copying off of the main module, I see I am missing this line

 'ngInject';

directly under the line

export default function($stateProvider) {

In client/app/games/routes.js
After adding that, the site loads again, and I can browse to http://locahost:3000/games

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions