angular-schema-form icon indicating copy to clipboard operation
angular-schema-form copied to clipboard

Cannot load angular modue when including schemaForm

Open tl-jakecross opened this issue 8 years ago • 3 comments

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

tl-jakecross avatar Oct 20 '17 10:10 tl-jakecross

@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.

Anthropic avatar Oct 21 '17 10:10 Anthropic

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

tl-jakecross avatar Oct 23 '17 08:10 tl-jakecross

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.

scottux avatar Aug 12 '18 13:08 scottux