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

Commit 2573e45

Browse files
committed
Override ngAnimate, which dies in server context with no $rootElement
1 parent aa2af92 commit 2573e45

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/ngoverrides.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ function registerModule(context) {
1313
// depend on it but it makes no sense to run server-defined routes *on* the server.
1414
context.module('sdr', []);
1515

16+
// an app that depends on ngAnimate will fail on the absence of $rootElement in unbootstrapped
17+
// server context, and animation is not relevant on the server, so we just override it.
18+
context.module('ngAnimate', []);
19+
1620
// we depend on ngRoute here to be sure that, even if the application has provided the "real"
1721
// ngRoute module, we'll always register after it and get to override $route.
1822
var module = context.module('angularjs-server', ['ng', 'ngRoute']);

0 commit comments

Comments
 (0)