json-schema-form / angular-schema-form

Generate forms from a JSON schema, with AngularJS!
https://json-schema-form.github.io/angular-schema-form
MIT License
2.47k stars 653 forks source link

Cannot load angular modue when including schemaForm #934

Open tl-jakecross opened 7 years ago

tl-jakecross commented 7 years ago

My index.html: (I've added a load of extra scripts before hand trying to get around this issue). I have taken the files schema-form and bootstrap-decorator straight from the bower_components folder when it installed them)

  <script src="angular-sanitize.min.js"></script>
  <script src="tv4.js"></script>
  <script src="ObjectPath.js"></script>
  <script type="text/javascript" src="assets/lib/schema-form.min.js"></script>
  <script type="text/javascript" src="assets/lib/bootstrap-decorator.min.js"></script>

My module:

var app = angular.module('MyApp', [
  'ui.grid',
  'ngRoute',
  'angularMoment',
  'schemaForm'
]);

Error in the page:

Error: [$injector:modulerr] Failed to instantiate module EnvironmentManager due to:
[$injector:modulerr] Failed to instantiate module schemaForm due to:
r is undefined

@json-schema-form/angular-schema-form-lead

Anthropic commented 7 years ago

@jake-cross if you make a plunker I am happy to help you sort it out, it is usually an ordering of loaded files or scripts within them though. Could also be incompatible versions of the library, all of which I can help with through a plunker.

tl-jakecross commented 7 years ago

Thanks for getting back to me, I'll do that as soon as I can.

scottux commented 6 years ago

Don't use the minified schema-form file and it will tell you the dependency you are missing. A good idea is to use wiredep to load these automagically.