Failed to create module formlyBootstrap
I installed angular-formly-templates-bootstrap
via bower into a project I was working on. But when I try to inject it into angular I get the following error:
Uncaught Error: [$injector:modulerr] Failed to instantiate module bandar due to:
Error: [$injector:modulerr] Failed to instantiate module formlyBootstrap due to:
Error: [$injector:nomod] Module 'formlyBootstrap' 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.
http://errors.angularjs.org/1.4.1/$injector/nomod?p0=formlyBootstrap
at http://localhost:3000/bower_components/angular/angular.js:68:12
at http://localhost:3000/bower_components/angular/angular.js:1949:17
at ensure (http://localhost:3000/bower_components/angular/angular.js:1873:38)
at module (http://localhost:3000/bower_components/angular/angular.js:1947:14)
at http://localhost:3000/bower_components/angular/angular.js:4355:22
at forEach (http://localhost:3000/bower_components/angular/angular.js:336:20)
at loadModules (http://localhost:3000/bower_components/angular/angular.js:4339:5)
at http://localhost:3000/bower_components/angular/angular.js:4356:40
at forEach (http://localhost:3000/bower_components/angular/angular.js:336:20)
at loadModules (http://localhost:3000/bower_components/angular/angular.js:4339:5)
The problem is that bower is not loading angular-formly-templates-bootstrap
into the browser. There are several other packages that are loaded into the browser using the gazebo. But I don't know what the problem is with formlyBootstrap
.
source to share
Are you using gulp for download dependencies? If so, look for something like this in your gulp config
exports.wiredep = {
exclude: [/bootstrap.js$/, /bootstrap-sass-official\/.*\.js/, /bootstrap\.css/],
directory: 'bower_components'
};
Thus, all files ending in "bootstrap.js" were omitted. You can trace something like this
exports.wiredep = {
exclude: [/[^-]bootstrap.js$/, /bootstrap-sass-official\/.*\.js/, /bootstrap\.css/],
directory: 'bower_components'
};
source to share
Received the same error. I have been working with the angular gulp generator which seems to ignore the formal bootstrap. I changed the main file in bower_components for angular-formly-bootstrap-template for dist / ... bootstrap.min.js. After that I started working. It looks like the generator was ignoring files having bootstrap.js at the end
source to share