ng-demos icon indicating copy to clipboard operation
ng-demos copied to clipboard

Modular dependency injection error?

Open RubyRabelle opened this issue 7 years ago • 1 comments

Hi John,

I am relatively new to AngularJS, I have been reading your style guide and watching your videos hoping to set up a solid skeleton project to use on the front-end of a spring MVC app to demo for my team (and management) at work so that we can step into this century for front-end development. Unfortunately, as a state agency we are behind a pretty strict firewall, so NPM and the like are frowned upon. We are also developing in a windows environment with an Apache Tomcat server on our local.

As a work-around to running the CLI, I manually copied down your Modular app, in hopes of using it as model. But I am getting an [$injector:modulerr] right off the bat. image

Being new to AngularJS, I'm not really sure where to go with this error message. I tried adjusting the dependency injections on avengers.js, but that didn't help. I don't know if this is because I'm using AngularJS 1.6.5? Because some of the build scripts (grunt/gulp?) may not be available without npm/node. Or do we just need to go back to writing .jsps?

Any suggestions would be appreciated. Thanks!

RubyRabelle avatar Jul 27 '17 14:07 RubyRabelle

Good morning @RubyRabelle ,

Unfortunately, without npm/bower you will more than likely be missing a number of dependencies. This particular error I believe is saying that the router is missing, as it is a separate module. If you would please check the section in the index page, ng-demos/modular/src/client/index.html, under the comment and ensure that all of the bower components are available to the project. Also as a side note if you are looking to mate spring and angular, you should checkout the JHipster project.

Hope this helps!

nickstaggs avatar Aug 01 '17 11:08 nickstaggs