0

Problem: I could not load the ui-bootstrap-tpls.js from node_modules

Error: [$injector:nomod] Module 'angular-bootstrap' 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.

'use strict';

export default require('angular')
  .module('lazyApp', [
    require('angular-ui-router'), 'angular-bootstrap',
    // @TODO: It's a hack! https://github.com/ocombe/ocLazyLoad/issues/179
    (() => {
      require('oclazyload');
      return 'oc.lazyLoad'
    })(),

    //require('angular-bootstrap',

    /*
     uncomment to move msg-store to bundle.js only instead
     of putting it in both: 3.bundle.js and 4.bundle.js
     */
    //require('commons/msg-store').name,
    require('./pages/home/home.routing').name,
    require('./pages/messages/messages.routing').name,
    //require('./pages/solr/solr.routing').name
  ]);
Lulylulu
  • 1,254
  • 8
  • 17
riadh zar
  • 329
  • 1
  • 2
  • 7

1 Answers1

0
var app = angular.module('app', [
    'ui.bootstrap'

Make sure the js script is loaded on file, if tyou use bower you can install with name

bower install angular-bootstrap --save

and then locate that file and load it on page

archer247
  • 36
  • 1
  • 6