Question

I'm looking to use AngularStrap in an existing Angular.js application which is using require.js as the module loader. I'm having trouble getting AngularStrap loaded correctly in the application. When I try to include 'angularStrap' in my Angular module, it fails to initialise. Below is an extract from my requirejs config.

  paths: {
    'angular' : 'lib/angularjs/angular',
    'angularStrap': 'lib/angularstrap/angular-strap',
    'angularStrapTpl': 'lib/angularstrap/angular-strap.tpl',
  },
  shim: {
    'angularStrap' : {
        deps : [ 'angular', 'angularStrapTpl' ], 
    },
  }

Has anyone managed to use AngularStrap with require.js? I suspect my dependencies are slightly incorrect.

Was it helpful?

Solution

Yo need to add angular-animate to your requirejs configuration.

Github Link: https://github.com/Augus/ngAnimate

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top