Skip to content
This repository has been archived by the owner on Aug 9, 2018. It is now read-only.

Commit

Permalink
Override ngAnimate, which dies in server context with no $rootElement
Browse files Browse the repository at this point in the history
  • Loading branch information
kshay committed Jul 22, 2014
1 parent aa2af92 commit 2573e45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ngoverrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ function registerModule(context) {
// depend on it but it makes no sense to run server-defined routes *on* the server.
context.module('sdr', []);

// an app that depends on ngAnimate will fail on the absence of $rootElement in unbootstrapped
// server context, and animation is not relevant on the server, so we just override it.
context.module('ngAnimate', []);

// we depend on ngRoute here to be sure that, even if the application has provided the "real"
// ngRoute module, we'll always register after it and get to override $route.
var module = context.module('angularjs-server', ['ng', 'ngRoute']);
Expand Down

0 comments on commit 2573e45

Please sign in to comment.